1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 09:16:16 +02:00

print the backend error code

This commit is contained in:
Dirk Mueller 2008-06-27 11:17:27 +00:00
parent 5768e35047
commit 9eba706bd3

View File

@ -1704,8 +1704,9 @@ def edit_meta(metatype,
try:
f.sync()
except urllib2.HTTPError, e:
print e
input = raw_input('Try again? (yY = Yes - nN = No): ')
if e.code >= 400 and e.headers.get('X-Opensuse-Errorcode'):
print >>sys.stderr, 'BuildService API error:', e.headers.get('X-Opensuse-Errorcode')
input = raw_input('Try again? ([y/N]): ')
if input != 'y' and input != 'Y':
break
else: