On Thursday 2011-01-20 23:04, Nicolas Palix wrote:
>>>
>>> Python 2.7(.0) reports "Python 2.7" for `python --version`. Instead of
>>> checking for a micro version that is not there, just see to it that the
>>> minor is right.
>
>Michael Stefaniuc has already reported that bug.
>See the thread at http://lists.diku.dk/pipermail/cocci/2011-January/001441.html
>
>A fix is pending with
>
>+    "Python 2\.([567]|[567]\.\S*)",
>
>I don't use perl very often (only to maintain that configure script in fact).
>So any insight on the better way to deal with that case is welcome.
>
>Is   "qr/Python 2\.[567]\b/," better is some way to what is pending ?

It is shorter, does not needlessy capture the argument
or even process anything beyond the 7.

>>>      if(check_config(
>>>       "python --version 2>&1 |",
>>> -     "Python 2\.[567]\..*",
>>> +     qr/Python 2\.[567]\b/,
>>>       "python is present",
>>>       "python is missing or is not a good version."
>>>         ))
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to