Small update/cleanup to Orchestra class
parent
32bb92c703
commit
86022ca4d1
|
@ -1,4 +1,8 @@
|
|||
[1.4.2014]
|
||||
[1.24.2015]
|
||||
Added...: DNS and ICMP client and server modules were previously added to the framework, but not documented in the changelog.
|
||||
Modified: Conductor class modified for cleaner checks of modules to load - Thanks to @harmj0y for helping review it
|
||||
|
||||
[1.4.2015]
|
||||
Added...: SMTP Client and Server modules have been added
|
||||
|
||||
[1.3.2015]
|
||||
|
|
|
@ -22,11 +22,7 @@ class Conductor:
|
|||
|
||||
def load_client_protocols(self, command_line_object):
|
||||
for name in glob.glob('protocols/clients/*.py'):
|
||||
if name.endswith("__init__.py"):
|
||||
pass
|
||||
elif name.endswith(".pyc"):
|
||||
pass
|
||||
else:
|
||||
if name.endswith(".py") and ("__init__" not in name):
|
||||
loaded_client_proto = imp.load_source(name.replace("/", ".").rstrip('.py'), name)
|
||||
self.client_protocols[name] = loaded_client_proto.Client(command_line_object)
|
||||
return
|
||||
|
@ -34,22 +30,14 @@ class Conductor:
|
|||
|
||||
def load_server_protocols(self, command_line_object):
|
||||
for name in glob.glob('protocols/servers/*.py'):
|
||||
if name.endswith("__init__.py"):
|
||||
pass
|
||||
elif name.endswith(".pyc"):
|
||||
pass
|
||||
elif name.endswith(".py"):
|
||||
if name.endswith(".py") and ("__init__" not in name):
|
||||
loaded_server_proto = imp.load_source(name.replace("/", ".").rstrip('.py'), name)
|
||||
self.server_protocols[name] = loaded_server_proto.Server(command_line_object)
|
||||
return
|
||||
|
||||
def load_datatypes(self, command_line_object):
|
||||
for name in glob.glob('datatypes/*.py'):
|
||||
if name.endswith("__init__.py"):
|
||||
pass
|
||||
elif name.endswith(".pyc"):
|
||||
pass
|
||||
else:
|
||||
if name.endswith(".py") and ("__init__" not in name):
|
||||
loaded_datatypes = imp.load_source(name.replace("/", ".").rstrip('.py'), name)
|
||||
self.datatypes[name] = loaded_datatypes.Datatype(command_line_object)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue