Revert command module loading change until fixed

git-svn-id: https://kippo.googlecode.com/svn/trunk@151 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster
2010-06-30 06:28:00 +00:00
parent 0d70a7b4e0
commit f6665ab796
2 changed files with 15 additions and 3 deletions

View File

@@ -0,0 +1,14 @@
# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
__all__ = [
'base',
'ls',
'ping',
'ssh',
'tar',
'wget',
'apt',
'dice',
'adduser',
]

View File

@@ -375,9 +375,7 @@ class HoneyPotEnvironment(object):
self.cfg = config()
self.commands = {}
import kippo.commands
modules = [x[:-3] for x in os.listdir('kippo/commands') if \
x.endswith('.py') and x[0] not in '._']
for c in modules:
for c in kippo.commands.__all__:
module = __import__('kippo.commands.%s' % c,
globals(), locals(), ['commands'])
self.commands.update(module.commands)