Fix exception messages for missing chains in ruleset.
authorMaximilian Wilhelm <max@rfc2324.org>
Mon, 14 Apr 2014 00:25:20 +0000 (02:25 +0200)
committerMaximilian Wilhelm <max@rfc2324.org>
Mon, 14 Apr 2014 00:25:20 +0000 (02:25 +0200)
Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>

python/alff/ruleset.py

index 292a938..7e5ac15 100644 (file)
@@ -261,7 +261,7 @@ class Ruleset (object):
                        chains = table_dict["chains"]
                        if chain:
                                if chain not in chains:
-                                       raise RulesetError ("Chain '%s' does not exist, you may want to create it.")
+                                       raise RulesetError ("Chain '%s' does not exist, you may want to create it." % chain)
 
                                table_dict["num_rules"] -= len (chains[chain]["rules"])
                                chains[chain]["rules"] = []
@@ -280,7 +280,7 @@ class Ruleset (object):
 
                # Chain already existant?
                if chain not in self.ruleset[protocol][table]["chains"]:
-                       raise RulesetError ("Chain '%s' does not exist, you may want to create it.")
+                       raise RulesetError ("Chain '%s' does not exist, you may want to create it." % chain)
 
                # Policy
                if mode == "P":