From 2c3df2c80a5f36657966c35afcf69b286b6948bf Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Sat, 13 Nov 2010 01:08:28 -0800 Subject: [PATCH] Don't throw a weird exception if REDO_BASE isn't set. --- vars.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vars.py b/vars.py index e286bd3..ca048ff 100644 --- a/vars.py +++ b/vars.py @@ -4,6 +4,8 @@ TARGET = os.environ.get('REDO_TARGET', '') DEPTH = os.environ.get('REDO_DEPTH', '') DEBUG = os.environ.get('REDO_DEBUG', '') and 1 or 0 VERBOSE = os.environ.get('REDO_VERBOSE', '') and 1 or 0 -BASE = os.path.abspath(os.environ['REDO_BASE']) -while BASE.endswith('/'): - BASE = BASE[:-1] +BASE = os.environ.get('REDO_BASE', '') +if BASE: + BASE = os.path.abspath(BASE) + while BASE and BASE.endswith('/'): + BASE = BASE[:-1]