1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-14 00:06:15 +01:00

Fix crash when there's no [general]/apiurl option in the config file

This commit is contained in:
Daniel Mach 2023-11-02 13:44:46 +01:00
parent a68377a387
commit 15db3a092f

View File

@ -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'