Messages in this thread | | | Date | Tue, 23 Aug 2011 12:20:23 -0400 | Subject | Re: [PATCH] Add a personality to report 2.6.x version numbers | From | Colin Walters <> |
| |
On Tue, Aug 23, 2011 at 12:11 PM, Andi Kleen <ak@linux.intel.com> wrote: > > That's a good point. I googled for this pattern in google codesearch > and there are 10+ in the first two pages. > > http://www.google.com/codesearch#search/&q=lang:^python$%20sys.platform%20linux2&p=1&type=cs
Yes, though I should note I wasn't trying to defend having a compatibility sysctl or whatever - I think it's clear these apps are broken. The python docs explicitly say that the returned string is just a straightforward transformation of uname, and if the apps read that carefully they'd realize they only want the first part.
The reportlab example will break for FreeBSD 5 too:
elif sys.platform in ("freebsd4", "darwin", "mac", "linux2"):
I just happen to watch Mozilla bugzilla so I saw that one go by and wanted to provide data for the discussion.
| |