Final version sample config

This commit is contained in:
Omar Sánchez
2021-10-05 10:04:48 +02:00
parent d23038c3c5
commit f212b586b0
3 changed files with 12 additions and 13 deletions

View File

@@ -54,7 +54,7 @@ class AutoFicher():
self.loadConfig()
def loadConfig(self):
with open('config.json', 'r') as f:
with open('sample.config.json', 'r') as f:
self.config = json.load(f)
def sendReport(self, message):
@@ -72,7 +72,7 @@ class AutoFicher():
return requests.post(self.config['api_url']+url, data=data, headers=headers)
def updateTime(self):
self.headers["tn-d"] = "\""+datetime.now().astimezone(pytz.UTC).strftime(self.config['time_format'])+"\""
self.headers["tn-d"] = "\""+datetime.now().astimezone(pytz.UTC).strftime("%Y-%m-%dT%H:%M:%SZ")+"\""
def getVersion(self):
self.updateTime()