Run setup when reloading a module.

This commit is contained in:
Sean B. Palmer
2009-06-18 14:20:12 +01:00
parent b35681c759
commit 5d48dd8ca7
3 changed files with 10 additions and 2 deletions

View File

@@ -25,6 +25,8 @@ def f_reload(phenny, input):
except ImportError:
module = getattr(__import__('opt.' + name), name)
reload(module)
if hasattr(module, 'setup'):
module.setup(phenny)
if hasattr(module, '__file__'):
import os.path, time