From 7ace1cb220fce11d19be1cba89941d1549e9c0d7 Mon Sep 17 00:00:00 2001 From: Amir Sarabadani Date: Mon, 24 Aug 2020 11:36:21 +0200 Subject: [PATCH] Fix path for gerrit-creds.json It's erroring now --- gerrit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gerrit.py b/gerrit.py index 2942274..b6626f2 100644 --- a/gerrit.py +++ b/gerrit.py @@ -23,7 +23,8 @@ from contextlib import contextmanager import requests -with open('gerrit-creds.json', 'r') as f: +dir_path = os.path.dirname(os.path.realpath(__file__)) +with open(os.path.join(dir_path, 'gerrit-creds.json'), 'r') as f: creds = json.loads(f.read())