Author Rasmus Rynning Rasmussen
Recipients Rasmus Rynning Rasmussen
Date 2016-01-27.17:45:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453916728.01.0.709818070841.issue26222@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-01-27 17:45:28Rasmus Rynning Rasmussensetrecipients: + Rasmus Rynning Rasmussen
2016-01-27 17:45:28Rasmus Rynning Rasmussensetmessageid: <1453916728.01.0.709818070841.issue26222@psf.upfronthosting.co.za>
2016-01-27 17:45:27Rasmus Rynning Rasmussenlinkissue26222 messages
2016-01-27 17:45:27Rasmus Rynning Rasmussencreate