From 86d91b9c3d12c6a9bebf9751e89893b36be0b5e6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 15 Dec 2014 22:44:11 +0100 Subject: [PATCH] Require BASEDIR in freeze.py. --- scripts/freeze.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/freeze.py b/scripts/freeze.py index 825e79a35..2efc5c54c 100755 --- a/scripts/freeze.py +++ b/scripts/freeze.py @@ -36,11 +36,8 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) from scripts import setupcommon -try: - BASEDIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), - os.path.pardir) -except NameError: - BASEDIR = None +BASEDIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), + os.path.pardir) def get_egl_path(): @@ -87,7 +84,6 @@ try: **setupcommon.setupdata ) finally: - if BASEDIR is not None: - path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') - if os.path.exists(path): - os.remove(path) + path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') + if os.path.exists(path): + os.remove(path)