load fs.pickle location from config

git-svn-id: https://kippo.googlecode.com/svn/trunk@49 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster 2009-11-22 07:00:04 +00:00
parent 6542b9cfb5
commit 876e116b62
1 changed files with 3 additions and 2 deletions

View File

@ -219,14 +219,15 @@ class HoneyPotAvatar(avatar.ConchUser):
class HoneyPotEnvironment(object): class HoneyPotEnvironment(object):
def __init__(self): def __init__(self):
self.cfg = config()
self.commands = {} self.commands = {}
import commands import commands
for c in commands.__all__: for c in commands.__all__:
module = __import__('commands.%s' % c, module = __import__('commands.%s' % c,
globals(), locals(), ['commands']) globals(), locals(), ['commands'])
self.commands.update(module.commands) self.commands.update(module.commands)
self.fs = pickle.load(file('fs.pickle')) self.fs = pickle.load(file(
self.cfg = config() self.cfg.get('honeypot', 'filesystem_file')))
class HoneyPotRealm: class HoneyPotRealm:
implements(portal.IRealm) implements(portal.IRealm)