check_env_flag now ignores case (#3317)

This commit is contained in:
Jon Crall
2017-10-27 05:45:02 -04:00
committed by Soumith Chintala
parent d56713680d
commit 9735ddd899

View File

@ -2,4 +2,4 @@ import os
def check_env_flag(name):
return os.getenv(name) in ['ON', '1', 'YES', 'TRUE', 'Y']
return os.getenv(name, '').upper() in ['ON', '1', 'YES', 'TRUE', 'Y']