Skip to content
Snippets Groups Projects
Commit f2b878fa authored by Pavel Kácha's avatar Pavel Kácha
Browse files

Allow for JavaScript "//" comments in configuration - better for

syntax highlighting. :)
parent 1033633c
No related branches found
No related tags found
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment