Merge pull request #18 from ChrisTruncer/small_cleanup

Small update/cleanup to Orchestra class
resolved_file
ChrisTruncer 2015-01-25 07:35:43 -05:00
commit 122c190dc3
2 changed files with 8 additions and 16 deletions

View File

@ -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]

View File

@ -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