From 9305972b51294c87b3a4d5f16c9474611df8d4bf Mon Sep 17 00:00:00 2001 From: Benjamin Collet Date: Mon, 10 Dec 2018 15:12:07 +0100 Subject: [PATCH] Support for absolute call --- client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client.py b/client.py index a25acda..b3dd9bd 100755 --- a/client.py +++ b/client.py @@ -3,8 +3,11 @@ import requests import yaml import argparse +import os -with open("config.yml", "r") as ymlfile: +config = os.path.join(os.path.dirname(os.path.realpath(__file__)),"config.yml") + +with open(config, "r") as ymlfile: cfg = yaml.load(ymlfile) def call_api(params, path):