Message259037
During the transition from python 2.7.10 to 2.7.11 some code seems to have been lost. platform.linux_distribution() is not able to recognise Debian based distributions in python 2.7.11.
The following code was present in platform.py, python 2.7.10, but seems to be missing in 2.7.11
# check for the LSB /etc/lsb-release file first, needed so
# that the distribution doesn't get identified as Debian.
try:
with open("/etc/lsb-release", "rU") as etclsbrel:
for line in etclsbrel:
m = _distributor_id_file_re.search(line)
if m:
_u_distname = m.group(1).strip()
m = _release_file_re.search(line)
if m:
_u_version = m.group(1).strip()
m = _codename_file_re.search(line)
if m:
_u_id = m.group(1).strip()
if _u_distname and _u_version:
return (_u_distname, _u_version, _u_id)
except (EnvironmentError, UnboundLocalError):
pass |
|
Date |
User |
Action |
Args |
2016-01-27 17:45:28 | Rasmus Rynning Rasmussen | set | recipients:
+ Rasmus Rynning Rasmussen |
2016-01-27 17:45:28 | Rasmus Rynning Rasmussen | set | messageid: <1453916728.01.0.709818070841.issue26222@psf.upfronthosting.co.za> |
2016-01-27 17:45:27 | Rasmus Rynning Rasmussen | link | issue26222 messages |
2016-01-27 17:45:27 | Rasmus Rynning Rasmussen | create | |
|