Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : 0.9-fixes
commit 7c6bcae1a6a8eec39d8ff641f095189fb11ead27 Author: Peter Hatina phatina@redhat.com Date: Tue Mar 4 09:21:50 2014 +0100
fix local imports
cli/lmi/shell/LMIConsole.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/cli/lmi/shell/LMIConsole.py b/cli/lmi/shell/LMIConsole.py index f1c9c4f..2b8de45 100644 --- a/cli/lmi/shell/LMIConsole.py +++ b/cli/lmi/shell/LMIConsole.py @@ -158,6 +158,10 @@ class LMIConsole(code.InteractiveConsole): sys.ps1 = LMIConsole.SHELL_PS1 sys.ps2 = LMIConsole.SHELL_PS2
+ # Add current working directory into Python's search list, so we can + # properly import any module placed in CWD + sys.path.insert(0, os.getcwd()) + # Interact more = 0 while 1: @@ -242,6 +246,10 @@ class LMIConsole(code.InteractiveConsole): locals["connect"] = connect self.locals = dict(self.locals.items() + locals.items())
+ # Add current working directory into Python's search list, so we can + # properly import any module placed in CWD + sys.path.insert(0, os.getcwd()) + # Execute the script sys.argv = script_argv exit_code = 0
cura-tools-devel@lists.fedorahosted.org