The only thing in helpers.py that needed vars.py was the log stuff.

So put it in its own file.  Now it's safer to import and use helpers even if
you can't safely touch vars.
This commit is contained in:
Avery Pennarun 2010-12-11 18:32:40 -08:00
commit e18fa85d58
12 changed files with 72 additions and 69 deletions

View file

@ -1,5 +1,5 @@
import os
import atoi
from atoi import atoi
if not os.environ.get('REDO'):
import sys
@ -10,7 +10,7 @@ if not os.environ.get('REDO'):
PWD = os.environ.get('REDO_PWD', '')
TARGET = os.environ.get('REDO_TARGET', '')
DEPTH = os.environ.get('REDO_DEPTH', '')
DEBUG = atoi.atoi(os.environ.get('REDO_DEBUG', ''))
DEBUG = atoi(os.environ.get('REDO_DEBUG', ''))
DEBUG_LOCKS = os.environ.get('REDO_DEBUG_LOCKS', '') and 1 or 0
DEBUG_PIDS = os.environ.get('REDO_DEBUG_PIDS', '') and 1 or 0
VERBOSE = os.environ.get('REDO_VERBOSE', '') and 1 or 0
@ -18,7 +18,7 @@ XTRACE = os.environ.get('REDO_XTRACE', '') and 1 or 0
KEEP_GOING = os.environ.get('REDO_KEEP_GOING', '') and 1 or 0
SHUFFLE = os.environ.get('REDO_SHUFFLE', '') and 1 or 0
STARTDIR = os.environ['REDO_STARTDIR']
RUNID = atoi.atoi(os.environ.get('REDO_RUNID')) or None
RUNID = atoi(os.environ.get('REDO_RUNID')) or None
BASE = os.environ['REDO_BASE']
while BASE and BASE.endswith('/'):
BASE = BASE[:-1]