use os.environ[] instead of os.getenv/os.putenv.

Oddly, in python, os.putenv() does not make changes that os.getenv() can see.
This commit is contained in:
Avery Pennarun 2010-11-12 23:14:02 -08:00
commit 45c6aad649
2 changed files with 12 additions and 12 deletions

10
vars.py
View file

@ -1,9 +1,9 @@
import os
REDO_TARGET = os.getenv('REDO_TARGET', '')
REDO_DEPTH = os.getenv('REDO_DEPTH', '')
REDO_DEBUG = os.getenv('REDO_DEBUG', '') and 1 or 0
REDO_VERBOSE = os.getenv('REDO_VERBOSE', '') and 1 or 0
REDO_BASE = os.path.abspath(os.getenv('REDO_BASE', ''))
REDO_TARGET = os.environ.get('REDO_TARGET', '')
REDO_DEPTH = os.environ.get('REDO_DEPTH', '')
REDO_DEBUG = os.environ.get('REDO_DEBUG', '') and 1 or 0
REDO_VERBOSE = os.environ.get('REDO_VERBOSE', '') and 1 or 0
REDO_BASE = os.path.abspath(os.environ['REDO_BASE'])
while REDO_BASE.endswith('/'):
REDO_BASE = REDO_BASE[:-1]