Fix crash introduced in 4414f65 via pull/245

This commit is contained in:
Tuncer Ayaz 2012-06-30 22:14:08 +02:00
parent 0c27fd4f7f
commit 49f3cc4108

View file

@ -64,8 +64,8 @@
?CONSOLE("Available templates:\n", []),
_ = [begin
BaseName = filename:basename(F, ".template"),
{ok, Template} = file:consult(F),
{_, VarList} = lists:keyfind(variables, 1, Template),
TemplateTerms = consult(load_file(Type, F)),
{_, VarList} = lists:keyfind(variables, 1, TemplateTerms),
Vars = lists:foldl(fun({V,_}, Acc) ->
[atom_to_list(V) | Acc]
end, [], VarList),