Update inventory.py

This commit is contained in:
Matthew Mosesohn 2016-12-29 10:57:58 +03:00 committed by GitHub
parent 3b4d9ceeca
commit 17f3d76445

View file

@ -86,8 +86,12 @@ class KargoInventory(object):
self.write_config(self.config_file) self.write_config(self.config_file)
def write_config(self, config_file): def write_config(self, config_file):
if config_file:
with open(config_file, 'w') as f: with open(config_file, 'w') as f:
self.config.write(f) self.config.write(f)
else:
print("WARNING: Unable to save config. Make sure you set "
"CONFIG_FILE env var.")
def debug(self, msg): def debug(self, msg):
if DEBUG: if DEBUG: