New submission from Rasmus Rynning Rasmussen:

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

----------
components: Build
messages: 259037
nosy: Rasmus Rynning Rasmussen
priority: normal
severity: normal
status: open
title: Missing code in linux_distribution python 2.7.11
type: performance
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26222>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to