diff options
-rw-r--r-- | MgaRepo/commands/github.py | 5 |
1 files 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: |