1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-08 05:58:43 +02:00

- add news entry

- also list the http error code
This commit is contained in:
Dirk Mueller
2008-06-27 11:24:15 +00:00
parent 9eba706bd3
commit 607ed31f97
2 changed files with 7 additions and 2 deletions

View File

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