Invalid config should be a nonzero exit
This commit is contained in:
parent
8d0599040c
commit
78d017223c
1 changed files with 2 additions and 2 deletions
|
@ -169,7 +169,6 @@ if __name__ == "__main__":
|
|||
sys.exit()
|
||||
|
||||
# Read configruation file
|
||||
#
|
||||
config = {}
|
||||
if os.path.isfile("/etc/default/clusterctrl"):
|
||||
with open ("/etc/default/clusterctrl") as configfile:
|
||||
|
@ -180,7 +179,8 @@ if __name__ == "__main__":
|
|||
|
||||
# If we're not a controller of some sort exit cleanly
|
||||
if ("type" not in config or not (config["type"] == "c" or config["type"] == "cnat")):
|
||||
sys.exit()
|
||||
print("Unable to load config, or invalid config loaded", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
# Functions
|
||||
# Send command to ClusterCTRL via I2C
|
||||
|
|
Loading…
Reference in a new issue