From 16c00be1b1b0805057fc799df3d0b6cb5b48699a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Fri, 22 Jul 2016 17:07:38 +0200 Subject: if no target specified for import, assume '.' --- MgaRepo/commands/github.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MgaRepo/commands/github.py b/MgaRepo/commands/github.py index 3d600bc..14a34c3 100644 --- a/MgaRepo/commands/github.py +++ b/MgaRepo/commands/github.py @@ -32,11 +32,12 @@ def github_delete(pkg, **kwargs): def parse_options(): parser = OptionParser(help=HELP) opts, args = parser.parse_args() - if len(args) < 2:#not in (2, 3): + if len(args) < 1 raise Error("invalid arguments") opts.func = globals().get("github_"+args[0], None) if args[0] == "import": - opts.target = args[1] + if len(args) > 1: + opts.target = args[1] elif args[0] == "delete" or args[0] == "clone": opts.pkg = args[1] else: -- cgit v1.2.1