From 848520f327b7b45c1320c4e23b9c3200baf55306 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Mon, 13 Aug 2018 15:46:00 -0400 Subject: [PATCH] Use absolute path for config.json --- common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common.py b/common.py index 0328eed..13cc19d 100644 --- a/common.py +++ b/common.py @@ -1,6 +1,7 @@ import csv import json import urllib3 +import os import sys from io import StringIO from xml.etree import ElementTree as ET @@ -11,7 +12,8 @@ from passwords import * # it's fine, ssl certs are for losers anyway urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) -config = json.load(open("config.json")) +config = json.load( + open(os.path.dirname(os.path.abspath(__file__)) + "/config.json")) ET.register_namespace("hid", "http://www.hidglobal.com/VertX") ET.register_namespace("hid", "http://www.hidcorp.com/VertX")