Reorganized targets
[sfa.git] / sfatables / commands / List.py
index e3c124e..a3cf713 100644 (file)
@@ -2,8 +2,8 @@ import os, time
 import libxml2
 import pdb
 
-from globals import *
-from pretty import Pretty
+from sfatables.globals import *
+from sfatables.pretty import Pretty
 from sfatables.command import Command
 
 class List(Command):
@@ -16,7 +16,6 @@ class List(Command):
     def __init__(self):
         return
 
-
     def get_info(self, type, xmlextension_path):
         xmldoc = libxml2.parseFile(xmlextension_path)
         p = xmldoc.xpathNewContext()
@@ -55,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