1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-12 23:56:13 +01:00

- minor changes/"cleanups"

This commit is contained in:
Marcus Huewe 2009-12-25 00:39:13 +01:00
parent 59073eaff5
commit 73a2d30180

View File

@ -2525,22 +2525,20 @@ Please submit there instead, or use --nodevelproject to force direct submission.
for file in files: for file in files:
if not opts.force: if not opts.force:
resp = raw_input("rm: remove source file `%s' from `%s/%s'? " % (file, project, package)) resp = raw_input("rm: remove source file `%s' from `%s/%s'? (yY|nN) " % (file, project, package))
if resp not in ('y', 'Y'): if resp not in ('y', 'Y'):
continue continue
try: try:
delete_files(conf.config['apiurl'], project, package, (file, )) delete_files(conf.config['apiurl'], project, package, (file, ))
except urllib2.HTTPError, e: except urllib2.HTTPError, e:
print >>sys.stderr, e.msg
if opts.force: if opts.force:
print >>sys.stderr, e
body = e.read() body = e.read()
if e.code in [ 400, 403, 404, 500 ]: if e.code in [ 400, 403, 404, 500 ]:
if '<summary>' in body: if '<summary>' in body:
msg = body.split('<summary>')[1] msg = body.split('<summary>')[1]
msg = msg.split('</summary>')[0] msg = msg.split('</summary>')[0]
print >>sys.stderr, msg print >>sys.stderr, msg
continue
else: else:
raise e raise e