diff --git a/warden3/warden_client/warden_client.py b/warden3/warden_client/warden_client.py index 752a9ec977b65fc0609c78312c7cf6d49fcc886a..9f13ab7c8501f3eedb62f93344e31061bcd0f724 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) diff --git a/warden3/warden_server/warden_server.py b/warden3/warden_server/warden_server.py index 2c38a36df9c3686e45ea42c5a96f7bd410420dda..cae6178ae65029a6a2107e85f9ca509b3ff3a3b9 100755 --- a/warden3/warden_server/warden_server.py +++ b/warden3/warden_server/warden_server.py @@ -879,7 +879,7 @@ def read_ini(path): def read_cfg(path): with open(path, "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(("#", "//")))) conf = json.loads(stripcomments) # Lowercase keys