diff --git a/ilogue/fexpect/internals.py b/ilogue/fexpect/internals.py index 941dbfe..d8a4721 100644 --- a/ilogue/fexpect/internals.py +++ b/ilogue/fexpect/internals.py @@ -14,8 +14,8 @@ def __exit__(self, type, value, tb): def wrapExpectations(cmd): script = createScript(cmd) remoteScript = '/tmp/fexpect_'+shortuuid.uuid() - import pexpect - pexpect_module = pexpect.__file__ + import imp + _, pexpect_module, _ = imp.find_module('pexpect') if pexpect_module.endswith('.pyc'): pexpect_module = pexpect_module[:-1] # If mode not set explicitly, and this is run as a privileged user,