Browse Source

fix bug with open

oz123 11 năm trước cách đây
mục cha
commit
d14b21041b
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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