Skip to content
Snippets Groups Projects
Commit b9ca1f23 authored by torrespel's avatar torrespel
Browse files

Update config.py

parent 29660fcf
No related branches found
No related tags found
2 merge requests!43Staging to Main for Release 1,!25Helper service
Pipeline #6034 failed
......@@ -3,18 +3,18 @@ import os
#Config class to get config
class Config:
def __init__(self):
self.cached = 0
self.file="./config.yaml"
self.my_config = {}
def __init__(self):
self.cached = 0
self.file="./config.yaml"
self.my_config = {}
stamp = os.stat(self.file).st_mtime
if stamp != self.cached:
self.cached = stamp
f = open(self.file)
self.my_config = yaml.safe_load(f)
f.close()
stamp = os.stat(self.file).st_mtime
if stamp != self.cached:
self.cached = stamp
f = open(self.file)
self.my_config = yaml.safe_load(f)
f.close()
def get_config(self):
return self.my_config
def get_config(self):
return self.my_config
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment