From c23c88f6e6d59006c22e970619883101837c48ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Sat, 14 May 2011 11:55:16 +0000 Subject: [PATCH] handle empty pykpathsea results git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@3071 069f4177-920e-0410-937b-c2a4a81bcd90 --- pyx/filelocator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyx/filelocator.py b/pyx/filelocator.py index 3f6ef084..1d9f0854 100644 --- a/pyx/filelocator.py +++ b/pyx/filelocator.py @@ -109,6 +109,10 @@ class pykpathsea: import pykpathsea for format in formats: full_filename = pykpathsea.find_file(filename, format) + if full_filename: + break + else: + return return lambda: builtinopen(full_filename, mode) locator_classes["pykpathsea"] = pykpathsea -- 2.11.4.GIT