aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/commands/github.py
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <proyvind@moondrake.org>2016-07-22 17:07:38 +0200
committerPer Øyvind Karlsen <proyvind@moondrake.org>2016-07-22 17:07:38 +0200
commit16c00be1b1b0805057fc799df3d0b6cb5b48699a (patch)
tree86ee5eac4fdca2bc3e8b8a71edbbe1c92953d65c /MgaRepo/commands/github.py
parent88d54a58ef783282b4a522addda02e18aa31f1f3 (diff)
downloadmgarepo-16c00be1b1b0805057fc799df3d0b6cb5b48699a.tar
mgarepo-16c00be1b1b0805057fc799df3d0b6cb5b48699a.tar.gz
mgarepo-16c00be1b1b0805057fc799df3d0b6cb5b48699a.tar.bz2
mgarepo-16c00be1b1b0805057fc799df3d0b6cb5b48699a.tar.xz
mgarepo-16c00be1b1b0805057fc799df3d0b6cb5b48699a.zip
if no target specified for import, assume '.'
Diffstat (limited to 'MgaRepo/commands/github.py')
-rw-r--r--MgaRepo/commands/github.py5
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: