From f2b878fa9a160f0cb4277a223def67927fd5450c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20K=C3=A1cha?= <ph@cesnet.cz> Date: Wed, 18 Feb 2015 19:41:13 +0100 Subject: [PATCH] Allow for JavaScript "//" comments in configuration - better for syntax highlighting. :) --- warden3/warden_client/warden_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warden3/warden_client/warden_client.py b/warden3/warden_client/warden_client.py index b1a9951..752a9ec 100644 --- a/warden3/warden_client/warden_client.py +++ b/warden3/warden_client/warden_client.py @@ -430,5 +430,5 @@ class Client(object): def read_cfg(cfgfile): abspath = path.join(path.dirname(__file__), cfgfile) with open(abspath, "r") as f: - stripcomments = "\n".join((l for l in f if not l.lstrip().startswith("#"))) + stripcomments = "\n".join((l for l in f if not l.lstrip().startswith("#", "//"))) return json.loads(stripcomments) -- GitLab