浏览代码

fix bug with open

oz123 11 年之前
父节点
当前提交
d14b21041b
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      pwman/ui/cli.py

+ 6 - 0
pwman/ui/cli.py

@@ -576,6 +576,9 @@ class PwmanCli(cmd.Cmd):
 
     def do_open(self, args):
         ids = self.get_ids(args)
+        if not args:
+            self.help_open()
+            return
         if len(ids) > 1:
             print "Can open only 1 link at a time ..."
             return None
@@ -988,6 +991,9 @@ class PwmanCliMac(PwmanCli):
 
     def do_open(self, args):
         ids = self.get_ids(args)
+        if not args:
+            self.help_open()
+            return
         if len(ids) > 1:
             print "Can open only 1 link at a time ..."
             return None