solve errors
This commit is contained in:
@@ -79,8 +79,6 @@ class AutoFicher():
|
||||
if args.geoAccuracy:
|
||||
self.config['geo']['accuracy'] = args.geoAccuracy
|
||||
|
||||
print(self.config)
|
||||
|
||||
def sendReport(self, message):
|
||||
bot = telegram.Bot(token=self.config['telegram']['token'])
|
||||
bot.sendMessage(chat_id=self.config['telegram']['chat_id'], text=str(message))
|
||||
@@ -155,8 +153,7 @@ class AutoFicher():
|
||||
self.sendReport('Corriendo en modo debug. No se realizará ninguna acción')
|
||||
if response.status_code == 200:
|
||||
if rj['Repeated']:
|
||||
time = datetime.strptime(rj['RepeatedTime'], "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=pytz.utc).astimezone(
|
||||
pytz.timezone("Europe/Madrid")).strftime("%H:%M")
|
||||
time = datetime.now().astimezone(pytz.timezone("Europe/Madrid")).strftime("%H:%M")
|
||||
self.sendReport("Se ha realizado un marcaje antes a las %s" % time)
|
||||
else:
|
||||
time = datetime.strptime(self.headers["tn-d"], "'%Y-%m-%dT%H:%M:%SZ'").replace(
|
||||
|
||||
Reference in New Issue
Block a user