Tweak.
authorSapan Bhatia <sapanb@cs.princeton.edu>
Tue, 15 Sep 2009 16:00:46 +0000 (16:00 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Tue, 15 Sep 2009 16:00:46 +0000 (16:00 +0000)
sfatables/commands/Delete.py
sfatables/commands/List.py

index d90c583..50b1d62 100644 (file)
@@ -15,7 +15,8 @@ class Delete(Command):
     def call(self, command_options, match_options, target_options):
 
         if (len(command_options.args)<2):
-            print "Please specify the chain and the rule number to delete, e.g. sfatables -D INCOMING 1"
+            print "Please specify the chain and the rule number to delete, e.g. sfatables -D INCOMING 1."
+            return
 
         chain = command_options.args[0]
 
index 1c383a1..fe44432 100644 (file)
@@ -54,6 +54,10 @@ class List(Command):
         return rule_list
 
     def call(self, command_options, match_options, target_options):
+        if (len(command_options.args) < 1):
+            print "Please specify the name of the chain you would like to list, e.g. sfatables -L INCOMING."
+            return
+
         chain = command_options.args[0]
         chain_dir = sfatables_config + "/" + chain