shebangs need to point at python2
[sfa.git] / sfa / client / sfaadmin.py
index 4cc3e8c..edfa9c0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 # pylint: disable=c0111, c0103, w0402, w0622
 
@@ -28,6 +28,9 @@ from sfa.client.sfi import save_records_to_file
 
 pprinter = PrettyPrinter(indent=4)
 
+# if set, will output on stdout
+DEBUG = False
+
 try:
     help_basedir = Hierarchy().basedir
 except Exception:
@@ -319,7 +322,8 @@ Users having a GID/PubKey correpondence NOT OK: %s and are: \n%s\n\n"
 
     def import_registry(self):
         """Run the importer"""
-        init_logger('import')
+        if not DEBUG:
+            init_logger('import')
         from sfa.importer import Importer
         importer = Importer()
         importer.run()
@@ -500,18 +504,13 @@ class AggregateCommands(Commands):
         self.api.manager.Delete(self.api, [xrn], [], {})
 
 
-class SliceManagerCommands(AggregateCommands):
-
-    def __init__(self, *args, **kwds):
-        self.api = Generic.the_flavour().make_api(interface='slicemgr')
-
-
 class SfaAdmin:
 
-    CATEGORIES = {'certificate': CertCommands,
-                  'registry': RegistryCommands,
-                  'aggregate': AggregateCommands,
-                  'slicemgr': SliceManagerCommands}
+    CATEGORIES = {
+        'certificate': CertCommands,
+        'registry': RegistryCommands,
+        'aggregate': AggregateCommands,
+       }
 
     # returns (name,class) or (None,None)
     def find_category(self, input):