Skip to content

Commit

Permalink
Merge pull request #1443 from dmach/fix-crash-when-missing-general-ap…
Browse files Browse the repository at this point in the history
…iurl

Fix crash when there's no [general]/apiurl option in the config file
  • Loading branch information
dmach authored Nov 2, 2023
2 parents a68377a + 15db3a0 commit 6a6d9cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4280,7 +4280,7 @@ def do_mbranch(self, subcmd, opts, *args):
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'
Expand Down Expand Up @@ -4451,7 +4451,7 @@ def do_branch(self, subcmd, opts, *args):
_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'
Expand Down

0 comments on commit 6a6d9cd

Please sign in to comment.