Browse Source

Update inventory.py

pull/838/head
Matthew Mosesohn 8 years ago
committed by GitHub
parent
commit
24cbf2287c
1 changed files with 6 additions and 2 deletions
  1. 8
      contrib/inventory_builder/inventory.py

8
contrib/inventory_builder/inventory.py

@ -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):
with open(config_file, 'w') as f:
self.config.write(f)
if config_file:
with open(config_file, 'w') as 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:

Loading…
Cancel
Save