_pms_eapi_re: require whitespace before comment
authorZac Medico <zmedico@gentoo.org>
Sun, 13 May 2012 19:49:41 +0000 (12:49 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 13 May 2012 19:49:41 +0000 (12:49 -0700)
See discussion on gentoo-pms mailing list here:
http://archives.gentoo.org/gentoo-pms/msg_1f76a55d04b4f2a3721cddc611434aad.xml

pym/portage/__init__.py

index 745e06af752abbbe06f2e9404ec0b91c8d50692c..bf3fdadaf3314aaf3304a703e64a1027bb92a09b 100644 (file)
@@ -446,7 +446,7 @@ def eapi_is_supported(eapi):
        return eapi <= portage.const.EAPI
 
 # This pattern is specified by PMS section 7.3.1.
-_pms_eapi_re = re.compile(r"^[ \t]*EAPI=(['\"]?)([A-Za-z0-9+_.-]*)\1[ \t]*(#.*)?$")
+_pms_eapi_re = re.compile(r"^[ \t]*EAPI=(['\"]?)([A-Za-z0-9+_.-]*)\1[ \t]*([ \t]#.*)?$")
 _comment_or_blank_line = re.compile(r"^\s*(#.*)?$")
 
 def _parse_eapi_ebuild_head(f):