podusowski / pake

Friendly C++ build system which doesn't follow trends
2 stars 1 forks source link

Fix to displaying variable which holds nothing. #16

Closed Quasek closed 9 years ago

Quasek commented 9 years ago

Empty uninitialized variables like "run_before" and "run_after" were print out on screen.

podusowski commented 9 years ago

got

$ python -B ../pake/src/pake.py 
Traceback (most recent call last):
  File "../pake/src/pake.py", line 45, in <module>
    main()
  File "../pake/src/pake.py", line 20, in main
    parse_source_tree()
  File "../pake/src/pake.py", line 15, in parse_source_tree
    variables.export_special_variables(configuration)
  File "/home/podusows/Development/pake/src/variables.py", line 20, in export_special_variables
    add("__configuration", variable.name, variable)
  File "/home/podusows/Development/pake/src/variables.py", line 170, in add
    variable = Variable(module_name, name, value)
  File "/home/podusows/Development/pake/src/variables.py", line 143, in __init__
    self.content = [content] if content else []
TypeError: __nonzero__ should return an int

on rusted repo with this merge