Fixed bug that crashed program if specified environment variable did not exist.
1 parent 2301f6c commit 7c92aac95d45bb00f5023f7be9ee11381f9864ad
@tundra tundra authored on 29 Mar 2010
Showing 1 changed file
View
9
tren.py
 
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
 
# 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
 
elif r[2].startswith(TOKCMDEXEC) and r[2].endswith(TOKCMDEXEC):