Move environment set up to site_scons
This commit is contained in:
parent
b9a582caf4
commit
2f1c86a793
5 changed files with 148 additions and 163 deletions
20
site_scons/site_init.py
Normal file
20
site_scons/site_init.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# site_init.py
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
import erw
|
||||
|
||||
#
|
||||
# Argument utils
|
||||
#
|
||||
|
||||
def get_bool_argument(arg):
|
||||
'''
|
||||
Convert the given argument value to a bool. True values are any integer that
|
||||
is considered true by Python, and any string value that isn't a
|
||||
capitalization variant of the word "false".
|
||||
'''
|
||||
try:
|
||||
return bool(int(arg))
|
||||
except ValueError:
|
||||
pass
|
||||
return str(arg).lower() != 'false'
|
Loading…
Add table
Add a link
Reference in a new issue