From a99085cea3dcb5a6821602f056f8fbe72df5d0ac Mon Sep 17 00:00:00 2001 From: fijal Date: Mon, 6 Aug 2007 15:58:18 +0200 Subject: [PATCH] [svn r45519] Ignore non-existing files --HG-- branch : trunk --- py/bin/py.lookup | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/py/bin/py.lookup b/py/bin/py.lookup index 366705f6f..ddff9e7ab 100755 --- a/py/bin/py.lookup +++ b/py/bin/py.lookup @@ -42,8 +42,11 @@ if __name__ == '__main__': string = args[0] if options.ignorecase: string = string.lower() - for x in curdir.visit('*.py', rec): - s = x.read() + for x in curdir.visit('*.py', rec): + try: + s = x.read() + except py.error.ENOENT: + pass # whatever, probably broken link (ie emacs lock) searchs = s if options.ignorecase: searchs = s.lower()