Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : 0.9-fixes
commit 02939eea19495500c94a4d071ed157b452ae3e2a Author: Peter Hatina phatina@redhat.com Date: Tue Mar 4 10:17:49 2014 +0100
fix local imports; move CWD at the end of import list
cli/lmi/shell/LMIConsole.py | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/cli/lmi/shell/LMIConsole.py b/cli/lmi/shell/LMIConsole.py index 2b8de45..174c52b 100644 --- a/cli/lmi/shell/LMIConsole.py +++ b/cli/lmi/shell/LMIConsole.py @@ -90,6 +90,10 @@ class LMIConsole(code.InteractiveConsole): # should propagate caught exceptions, or dump them lmi_set_use_exceptions(self._use_exceptions)
+ # Append current working directory into Python's search list, so we can + # properly import any module placed in CWD + sys.path.append(os.getcwd()) + def setup_completer(self): """ Initializes tab-completer. @@ -158,10 +162,6 @@ 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: @@ -246,10 +246,6 @@ 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