mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-09 22:36:14 +01:00
Merge branch 'always_parse_config' of https://github.com/marcus-h/osc
Osc.postoptparse only returns if the get_config call succeeds.
This commit is contained in:
commit
bf9e046f2f
@ -131,7 +131,7 @@ class Osc(cmdln.Cmdln):
|
||||
return optparser
|
||||
|
||||
|
||||
def postoptparse(self, try_again = True):
|
||||
def postoptparse(self):
|
||||
"""merge commandline options into the config"""
|
||||
try:
|
||||
conf.get_config(override_conffile = self.options.conffile,
|
||||
@ -152,19 +152,16 @@ class Osc(cmdln.Cmdln):
|
||||
apiurl = self.options.apiurl
|
||||
conf.interactive_config_setup(e.file, apiurl)
|
||||
print('done', file=sys.stderr)
|
||||
if try_again:
|
||||
self.postoptparse(try_again = False)
|
||||
self.postoptparse()
|
||||
except oscerr.ConfigMissingApiurl as e:
|
||||
print(e.msg, file=sys.stderr)
|
||||
conf.interactive_config_setup(e.file, e.url, initial=False)
|
||||
if try_again:
|
||||
self.postoptparse(try_again = False)
|
||||
self.postoptparse()
|
||||
except oscerr.ConfigMissingCredentialsError as e:
|
||||
print(e.msg)
|
||||
print('Please enter new credentials.')
|
||||
conf.interactive_config_setup(e.file, e.url, initial=False)
|
||||
if try_again:
|
||||
self.postoptparse(try_again = False)
|
||||
self.postoptparse()
|
||||
|
||||
self.options.verbose = conf.config['verbose']
|
||||
self.download_progress = None
|
||||
|
Loading…
Reference in New Issue
Block a user