From a20c6d072d70c535ed1f116fc04016c834ea9c14 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sun, 23 Aug 2015 11:20:34 -0300 Subject: [PATCH] Fix getdoctarget to ignore comment lines --- doc/en/_getdoctarget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/_getdoctarget.py b/doc/en/_getdoctarget.py index 70427f745..20e487bb7 100755 --- a/doc/en/_getdoctarget.py +++ b/doc/en/_getdoctarget.py @@ -6,7 +6,7 @@ def get_version_string(): fn = py.path.local(__file__).join("..", "..", "..", "_pytest", "__init__.py") for line in fn.readlines(): - if "version" in line: + if "version" in line and not line.strip().startswith('#'): return eval(line.split("=")[-1]) def get_minor_version_string():