mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-12 08:56:13 +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
|
return
|
||||||
|
|
||||||
apiopt = ''
|
apiopt = ''
|
||||||
if conf.get_configParser().get('general', 'apiurl') != apiurl:
|
if conf.get_configParser().get("general", "apiurl", fallback=None) != apiurl:
|
||||||
apiopt = '-A %s ' % apiurl
|
apiopt = '-A %s ' % apiurl
|
||||||
print('A working copy of the maintenance branch can be checked out with:\n\n'
|
print('A working copy of the maintenance branch can be checked out with:\n\n'
|
||||||
'osc %sco %s'
|
'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")
|
_private.print_msg('Note: You can use "osc delete" or "osc submitpac" when done.\n', print_to="verbose")
|
||||||
else:
|
else:
|
||||||
apiopt = ''
|
apiopt = ''
|
||||||
if conf.get_configParser().get('general', 'apiurl') != apiurl:
|
if conf.get_configParser().get("general", "apiurl", fallback=None) != apiurl:
|
||||||
apiopt = '-A %s ' % apiurl
|
apiopt = '-A %s ' % apiurl
|
||||||
print('A working copy of the branched package can be checked out with:\n\n'
|
print('A working copy of the branched package can be checked out with:\n\n'
|
||||||
'osc %sco %s/%s'
|
'osc %sco %s/%s'
|
||||||
|
Loading…
Reference in New Issue
Block a user