Commit 9235a035 authored by Robert Ricci's avatar Robert Ricci

Load config from global file

parent b0af8842
#!/usr/bin/env python3.5
import sys
import os.path
import as place
import snappylib.commands as commands
import snappylib.configuration as configuration
......@@ -12,5 +13,8 @@ else:
# Special case for the check command - it will want control over loading
# the ini file itself
if sys.argv[0] != "check":
configfile = None
if os.path.isfile(configuration.GLOBALFILE):
configfile = configuration.GLOBALFILE
commands.byname.get(sys.argv.pop(0), commands.usage).call()
......@@ -3,6 +3,8 @@
import configparser
import as place
GLOBALFILE = "/etc/snappy.conf"
class Configuration:
# Default paths, can be overriden
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment