projects
/
platform
/
upstream
/
zypper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b662e0
)
zypper-log: view better error msg when logfile doesn't exist
author
Dominik Heidler
<dheidler@suse.de>
Wed, 13 Jul 2011 13:40:15 +0000
(15:40 +0200)
committer
Dominik Heidler
<dheidler@suse.de>
Wed, 13 Jul 2011 13:40:15 +0000
(15:40 +0200)
tools/zypper-log
patch
|
blob
|
history
diff --git
a/tools/zypper-log
b/tools/zypper-log
index
3909578
..
9d6bb03
100755
(executable)
--- a/
tools/zypper-log
+++ b/
tools/zypper-log
@@
-29,7
+29,11
@@
def getLogFiles(rotate = 0):
return logfiles[-rotate-1::]
def readFile(logfile):
- logtxt = open(logfile).read()
+ try:
+ logtxt = open(logfile).read()
+ except IOError, e:
+ print >> sys.stderr, "\rIOError: %s: '%s'" % (e.strerror, e.filename)
+ sys.exit(1)
fext = logfile.split('.')[-1]
if fext == 'bz2':
logtxt = bz2.decompress(logtxt)