Skip to content

Commit

Permalink
fedup --clean should exit parse_args() early
Browse files Browse the repository at this point in the history
`fedup --clean` is basically a different mode than normal fedup, so we
need to skip the rest of the argument parsing if we're doing cleanup.

Resolves: rhbz#1158766
  • Loading branch information
wgwoods committed Oct 30, 2014
1 parent 4a2f9e0 commit 64bfc8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fedup/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ def parse_args(gui=False):

args = p.parse_args()

if args.clean:
args.resetbootloader = True
return args

if not (gui or args.network or args.device or args.iso or args.clean):
p.error(_('SOURCE is required (--network, --device, --iso)'))

Expand All @@ -139,10 +143,6 @@ def parse_args(gui=False):
if args.instrepo and args.instrepokey:
args.repos.append(('gpgkey', 'instrepo=%s' % args.instrepokey))

if not gui:
if args.clean:
args.resetbootloader = True

# Fedora.next: upgrades to F21 require --product
if legacy_fedora:
if args.product is None:
Expand Down

0 comments on commit 64bfc8c

Please sign in to comment.