[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

Ross Lagerwall report at bugs.python.org
Mon Jun 20 17:22:25 CEST 2011


Ross Lagerwall <rosslagerwall at gmail.com> added the comment:

> That's exactly my point.
> Code checking sys.platform against 'linux2' is already broken, there's
> no point in complicating the code further, or adding a new constant.
> If you want to check for a specific operating system, there's already
> platform.system().

I would agree with this. Perhaps the documentation for sys.platform could be changed to mention that platform.system() should maybe be used instead.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12326>
_______________________________________


More information about the Python-bugs-list mailing list