From 3a34c3be7bf528c86aadb611e1b33f8a65f7ee6e Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Mon, 23 Sep 2019 09:10:26 +0100 Subject: [PATCH] #68: Update config.py --- common/config.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/common/config.py b/common/config.py index e68d87b3..69d27490 100644 --- a/common/config.py +++ b/common/config.py @@ -33,4 +33,17 @@ def is_generate_swagger(self): except: sys.exit("Missing config value, generate_swagger") + def get_host(self): + try: + return self.config["host"] + except: + sys.exit("Missing config value, host") + + def get_port(self): + try: + return self.config["port"] + except: + sys.exit("Missing config value, port") + + config = Config()