From 0e1e84913624e7eb05987c54db86d8eb8cf02d63 Mon Sep 17 00:00:00 2001 From: Loic Baron Date: Tue, 2 Dec 2014 16:28:20 +0100 Subject: [PATCH] fixed path --- rest/monitor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rest/monitor.py b/rest/monitor.py index 22521891..77295495 100644 --- a/rest/monitor.py +++ b/rest/monitor.py @@ -7,7 +7,7 @@ import ConfigParser def servicesStatus(request): Config = ConfigParser.ConfigParser() - Config.read(os.getcwd() + "/myslice/monitor.ini") + Config.read(os.getcwd() + "/myslice/myslice/monitor.ini") result = {} @@ -16,15 +16,15 @@ def servicesStatus(request): cert = os.path.abspath(Config.get('monitor', 'cert')) if not os.path.isfile(cert) : - return HttpResponse(json.dumps({'error' : '-1'}), content_type="application/json") + return HttpResponse(json.dumps({'error' : '-2'}), content_type="application/json") if not Config.has_option('monitor', 'pkey') : - return HttpResponse(json.dumps({'error' : '-2'}), content_type="application/json") + return HttpResponse(json.dumps({'error' : '-3'}), content_type="application/json") pkey = os.path.abspath(Config.get('monitor', 'pkey')) if not os.path.isfile(pkey) : - return HttpResponse(json.dumps({'error' : '-2'}), content_type="application/json") + return HttpResponse(json.dumps({'error' : '-4'}), content_type="application/json") services = Config.sections() for s in services : @@ -59,4 +59,4 @@ def servicesStatus(request): result[s]['status'] = 'ko' - return HttpResponse(json.dumps(result), content_type="application/json") \ No newline at end of file + return HttpResponse(json.dumps(result), content_type="application/json") -- 2.43.0