resolve config.json root path
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user