1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-02 19:39:38 +02:00

- print more information if a PackageInternalError exception is caught

This commit is contained in:
Marcus Huewe
2010-09-03 19:59:14 +02:00
parent 57a3832a8e
commit 31f14c7abe
2 changed files with 13 additions and 5 deletions

View File

@@ -153,6 +153,18 @@ def run(prg):
print >>sys.stderr, e.msg
return 1
except oscerr.PackageInternalError, e:
import traceback
print >>sys.stderr, 'a package internal error occured\n' \
'please file a bug and attach your current package working copy ' \
'and the following traceback to it:'
print >>sys.stderr, e.msg
traceback.print_exc(file=sys.stderr)
except oscerr.PackageError, e:
print >>sys.stderr, e.msg
return 1
except AttributeError, e:
print >>sys.stderr, e
return 1
@@ -177,8 +189,4 @@ def run(prg):
print >>sys.stderr, e
return 1
except oscerr.PackageError, e:
print >>sys.stderr, e.msg
return 1
# vim: sw=4 et

View File

@@ -1390,7 +1390,7 @@ class Package:
'error: file \'%s\' is known by meta but no storefile exists.\n'
'This might be caused by an old wc format. Please backup your current\n'
'wc and checkout the package again. Afterwards copy all files (except the\n'
'.osc/ dir) into the new package wc. Please file a bug.' % n)
'.osc/ dir) into the new package wc.' % n)
else:
# this case shouldn't happen (except there was a typo in the filename etc.)
raise oscerr.OscIOError(None, 'osc: \'%s\' is not under version control' % n)