1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-24 00:56:15 +01:00
It is ridiculous that we have duplicated code for "osc sr" and
"osc createrequest"...
This commit is contained in:
Marcus Huewe 2013-11-15 11:39:21 +01:00
parent 6a36b5180a
commit b2493a25ae

View File

@ -1096,7 +1096,7 @@ class Osc(cmdln.Cmdln):
f = http_GET(u)
root = ET.parse(f).getroot()
value = root.findtext('attribute/value')
if value:
if value and not opts.yes:
repl = ''
print('\n\nThere are already following submit request: %s.' % \
', '.join([str(i) for i in myreqs ]))
@ -1410,7 +1410,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
user = conf.get_apiurl_usr(apiurl)
myreqs = [ i for i in reqs if i.state.who == user ]
repl = 'y'
if len(myreqs) > 0 and not opts.yes:
if len(myreqs) > 0:
print('You already created the following submit request: %s.' % \
', '.join([i.reqid for i in myreqs ]))
repl = raw_input('Supersede the old requests? (y/n/c) ')