should probably call config() before using it

git-svn-id: https://kippo.googlecode.com/svn/trunk@84 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster 2009-11-26 21:33:26 +00:00
parent b4ef820816
commit 8c4eae2f57
1 changed files with 1 additions and 1 deletions

View File

@ -321,6 +321,7 @@ class HoneypotPasswordChecker:
return defer.fail(error.UnauthorizedLogin())
def getRSAKeys():
cfg = config()
if not (os.path.exists('public.key') and os.path.exists('private.key')):
# generate a RSA keypair
print "Generating RSA keypair..."
@ -334,7 +335,6 @@ def getRSAKeys():
file(cfg.get('honeypot', 'private_key'), 'w+b').write(privateKeyString)
print "done."
else:
cfg = config()
publicKeyString = file(cfg.get('honeypot', 'public_key')).read()
privateKeyString = file(cfg.get('honeypot', 'private_key')).read()
return publicKeyString, privateKeyString