From b79c62ef49774186988e09dc19ae9e84e42499f1 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 2 Sep 2009 16:22:26 +0100 Subject: [PATCH] it's possible to hit the finally with no f --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 80964bbd..38be0b4e 100755 --- a/setup.py +++ b/setup.py @@ -79,6 +79,7 @@ class Uninstall(Command): return 'uninstall' def run(self): + f = None self.ensure_filename('manifest') try: try: @@ -87,7 +88,8 @@ class Uninstall(Command): except IOError, e: raise DistutilsFileError("unable to open install manifest: %s", str(e)) finally: - f.close() + if f: + f.close() for file in files: if os.path.isfile(file) or os.path.islink(file):