[Pacemaker] [PATCH] Medium: build: require Python 2.4 or later
Florian Haas
florian.haas at linbit.com
Mon Feb 15 10:39:40 UTC 2010
On 2010-02-15 10:17, Dejan Muhamedagic wrote:
> Applied too.
>
> Cheers,
>
> Dejan
>
> P.S. If necessary, we could add some compatibility layer for
> older pythons. Actually, in the very beginning, old popen was
> used, then replaced because of the ugly "will be obsoleted"
> warning messages :-/
Of course if you can do something like
HAVE_SUBPROCESS=True
try:
import subprocess
except ImportError:
HAVE_SUBPROCESS=False
... and then replace your Popen() calls with something that either uses
Popen() or os.popen() based on the value of HAVE_SUBPROCESS, then that
would do it. Or you generate your code with some autotools magic, based
on AX_PYTHON_MODULE. That would probably make the end result a bit prettier.
Cheers,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20100215/2454ba7e/attachment-0004.sig>
More information about the Pacemaker
mailing list