Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the failure of import pexpect in Windows. #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixed the failure of import pexpect in Windows.
pexpect module does not support Windows, import will fail.
But because it is not required other than absolute path,
use the imp.find_module instead.
shiena committed Oct 6, 2013
commit 77a6ea85bf7e4f816205d43ce090088a3ece8f56
4 changes: 2 additions & 2 deletions ilogue/fexpect/internals.py
Original file line number Diff line number Diff line change
@@ -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')[1]
if pexpect_module.endswith('.pyc'):
pexpect_module = pexpect_module[:-1]
# If mode not set explicitly, and this is run as a privileged user,