From 5a2a814d92f791a8ce81d7394fc10bea552ce5dd Mon Sep 17 00:00:00 2001 From: Lasse Fister Date: Wed, 26 Nov 2014 01:59:56 +0100 Subject: [PATCH] Define UFOReader._checkForFile as an alias of os.path.exists Maybe we should rather replace it with os.path.exists, as this would make the code easier to read. Also os.path.exists is already used very often in ufoLib.__init__ --- Lib/ufoLib/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Lib/ufoLib/__init__.py b/Lib/ufoLib/__init__.py index b5eff619d..2c7c8f717 100755 --- a/Lib/ufoLib/__init__.py +++ b/Lib/ufoLib/__init__.py @@ -157,11 +157,7 @@ class UFOReader(object): # support methods - def _checkForFile(self, path): - if not os.path.exists(path): - return False - else: - return True + _checkForFile = staticmethod(os.path.exists) def _readPlist(self, path): """