diff --git a/tren.py b/tren.py index 16316b0..845c1b4 100755 --- a/tren.py +++ b/tren.py @@ -8,7 +8,7 @@ PROGNAME = "tren.py" BASENAME = PROGNAME.split(".py")[0] PROGENV = BASENAME.upper() -RCSID = "$Id: tren.py,v 1.212 2010/03/28 19:52:04 tundra Exp $" +RCSID = "$Id: tren.py,v 1.213 2010/03/29 20:37:26 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -1272,7 +1272,14 @@ # Environment Variable replacement token elif r[2].startswith(TOKENV): + r[2] = os.getenv(r[2][1:]) + + # Handle case for nonexistent environment variable + + if not r[2]: + r[2] = "" + # Command Run replacement token