mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-24 17:16:12 +01:00
Merge pull request #1443 from dmach/fix-crash-when-missing-general-apiurl
Fix crash when there's no [general]/apiurl option in the config file
This commit is contained in:
commit
6a6d9cdc83
@ -4280,7 +4280,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
return
|
||||
|
||||
apiopt = ''
|
||||
if conf.get_configParser().get('general', 'apiurl') != apiurl:
|
||||
if conf.get_configParser().get("general", "apiurl", fallback=None) != apiurl:
|
||||
apiopt = '-A %s ' % apiurl
|
||||
print('A working copy of the maintenance branch can be checked out with:\n\n'
|
||||
'osc %sco %s'
|
||||
@ -4451,7 +4451,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
_private.print_msg('Note: You can use "osc delete" or "osc submitpac" when done.\n', print_to="verbose")
|
||||
else:
|
||||
apiopt = ''
|
||||
if conf.get_configParser().get('general', 'apiurl') != apiurl:
|
||||
if conf.get_configParser().get("general", "apiurl", fallback=None) != apiurl:
|
||||
apiopt = '-A %s ' % apiurl
|
||||
print('A working copy of the branched package can be checked out with:\n\n'
|
||||
'osc %sco %s/%s'
|
||||
|
Loading…
Reference in New Issue
Block a user