From 3fafeacdcb94366cb205f03c6284a29bdaaf21bb Mon Sep 17 00:00:00 2001 From: hpk Date: Mon, 18 Aug 2008 20:02:56 +0200 Subject: [PATCH] [svn r57442] robustify. this can also happen to get exectued while being in another version of the py lib. --HG-- branch : trunk --- py/bin/py.lookup | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/py/bin/py.lookup b/py/bin/py.lookup index 7c1ac790a..36aa645b3 100755 --- a/py/bin/py.lookup +++ b/py/bin/py.lookup @@ -10,7 +10,10 @@ prepended.""" import sys, os sys.path.insert(0, os.path.dirname(__file__)) from _findpy import py -from py.__.io.terminalwriter import ansi_print, terminal_width +try: + from py.__.io.terminalwriter import ansi_print, terminal_width +except ImportError: + from py.__.misc.terminal_helper import ansi_print, terminal_width import re curdir = py.path.local()