Fix template module

This commit is contained in:
Michael DeHaan 2012-03-14 19:08:10 -04:00
parent 36e86abc24
commit aae72ec617

View file

@ -31,8 +31,13 @@ except ImportError:
# to a dictionary
# FIXME: make more idiomatic
args = " ".join(sys.argv[1:])
items = shlex.split(args)
if len(sys.argv) == 1:
sys.exit(1)
argfile = sys.argv[1]
if not os.path.exists(argfile):
sys.exit(1)
items = shlex.split(open(argfile, 'r').read())
params = {}
for x in items:
(k, v) = x.split("=")