Przeglądaj źródła

Fixed errors that I introduced in last commit.

Juan Pablo Caram 9 lat temu
rodzic
commit
66901041d9
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      tclCommands/__init__.py

+ 4 - 4
tclCommands/__init__.py

@@ -26,11 +26,11 @@ def register_all_commands(app, commands):
     """
     """
     Static method which register all known commands.
     Static method which register all known commands.
 
 
-    Command should  be for now in directory test_tclCommands and module should start with TCLCommand
+    Command should  be for now in directory tclCommands and module should start with TCLCommand
     Class  have to follow same  name as module.
     Class  have to follow same  name as module.
 
 
     we need import all  modules  in top section:
     we need import all  modules  in top section:
-    import test_tclCommands.TclCommandExteriors
+    import tclCommands.TclCommandExteriors
     at this stage we can include only wanted  commands  with this, auto loading may be implemented in future
     at this stage we can include only wanted  commands  with this, auto loading may be implemented in future
     I have no enough knowledge about python's anatomy. Would be nice to include all classes which are descendant etc.
     I have no enough knowledge about python's anatomy. Would be nice to include all classes which are descendant etc.
 
 
@@ -39,10 +39,10 @@ def register_all_commands(app, commands):
     :return: None
     :return: None
     """
     """
 
 
-    tcl_modules = {k: v for k, v in sys.modules.items() if k.startswith('test_tclCommands.TclCommand')}
+    tcl_modules = {k: v for k, v in sys.modules.items() if k.startswith('tclCommands.TclCommand')}
 
 
     for key, mod in tcl_modules.items():
     for key, mod in tcl_modules.items():
-        if key != 'test_tclCommands.TclCommand':
+        if key != 'tclCommands.TclCommand':
             class_name = key.split('.')[1]
             class_name = key.split('.')[1]
             class_type = getattr(mod, class_name)
             class_type = getattr(mod, class_name)
             command_instance = class_type(app)
             command_instance = class_type(app)