From de3960aef059183890c231a3682248c3f83635af Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Tue, 15 Sep 2009 16:00:46 +0000 Subject: [PATCH] Tweak. --- sfatables/commands/Delete.py | 3 ++- sfatables/commands/List.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sfatables/commands/Delete.py b/sfatables/commands/Delete.py index d90c583f..50b1d626 100644 --- a/sfatables/commands/Delete.py +++ b/sfatables/commands/Delete.py @@ -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] diff --git a/sfatables/commands/List.py b/sfatables/commands/List.py index 1c383a14..fe44432c 100644 --- a/sfatables/commands/List.py +++ b/sfatables/commands/List.py @@ -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 -- 2.47.0