From 9859ccde8aae753855312f81ae122fb617bb6268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20S=C3=A1nchez?= Date: Wed, 20 Oct 2021 12:43:51 +0200 Subject: [PATCH] resolve config.json root path --- autoficher.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoficher.py b/autoficher.py index e1eee63..09233dd 100755 --- a/autoficher.py +++ b/autoficher.py @@ -15,6 +15,7 @@ # Importamos librerias import json from datetime import datetime +import os import pytz import requests @@ -62,7 +63,8 @@ class AutoFicher(): exit(20) def loadConfig(self): - path = 'config.json' + ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) + path = os.path.join(ROOT_DIR, 'config.json') if args.config: path = args.config