[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#845489: lsb-release: lsb_release.py : FileNotFound and Python 2.7



Package: lsb-release
Version: 9.20161101
Severity: important
Tags: upstream

Dear Maintainer,

The script lsb_release.py in

    /usr/lib/python2.7/dist-packages/lsb_release.py

is buggy. Indeed, it uses 'FileNotFoundError' which is not defined in
Python 2.7. This results into bugs when you run the python function

    lsb_release.get_distro_information()

when the file /usr/share/distro-info/%s.csv does not exists (it is for
example the case on my raspberrypi which runs raspbian) :

     release = lsb_release.get_distro_information()
     File "/usr/lib/python2.7/dist-packages/lsb_release.py", line 341,
in get_distro_information
     distinfo = guess_debian_release()
     File "/usr/lib/python2.7/dist-packages/lsb_release.py", line 239,
in guess_debian_release
     get_distro_info(distinfo['ID'])
     File "/usr/lib/python2.7/dist-packages/lsb_release.py", line 33, in
get_distro_info
          except FileNotFoundError:
          NameError: global name 'FileNotFoundError' is not defined


The fix should be pretty trivial, but it would be nice to make it
working. Thank you in advance for solving this bug,

tobiasBora.

-- Package-specific info:
lsb_release output
-*- -*- -*- -*- -*-
Distributor ID: Debian
Description:    Debian GNU/Linux unstable (sid)
Release:        unstable
Codename:       sid
-*- -*- -*- -*- -*-
    Apt policy
-*- -*- -*- -*- -*-
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500
http://ppa.launchpad.net/webcamstudio/webcamstudio-dailybuilds/ubuntu
xenial/main i386 Packages
     release
v=16.04,o=LP-PPA-webcamstudio-webcamstudio-dailybuilds,a=xenial,n=xenial,l=WebcamStudio
PPA (Daily Builds),c=main,b=i386
     origin ppa.launchpad.net
 500
http://ppa.launchpad.net/webcamstudio/webcamstudio-dailybuilds/ubuntu
xenial/main amd64 Packages
     release
v=16.04,o=LP-PPA-webcamstudio-webcamstudio-dailybuilds,a=xenial,n=xenial,l=WebcamStudio
PPA (Daily Builds),c=main,b=amd64
     origin ppa.launchpad.net
 500 https://pkg.tox.chat/debian nightly/sid i386 Packages
     release o=pkg.tox.chat,a=nightly,n=nightly,l=pkg.tox.chat,c=sid,b=i386
     origin pkg.tox.chat
 500 https://pkg.tox.chat/debian nightly/sid amd64 Packages
     release o=pkg.tox.chat,a=nightly,n=nightly,l=pkg.tox.chat,c=sid,b=amd64
     origin pkg.tox.chat
 500 https://dl.bintray.com/sbt/debian  Packages
     release o=Bintray,l=Bintray,c=
     origin dl.bintray.com
 500
http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_8.0 
Packages
     release
o=obs://build.opensuse.org/isv:ownCloud:desktop/Debian_8.0,n=Debian_8.0,l=isv:ownCloud:desktop,c=
     origin download.opensuse.org
 500 http://download.fpcomplete.com/debian jessie/main amd64 Packages
     release n=jessie,c=main,b=amd64
     origin download.fpcomplete.com
 500 https://apt.dockerproject.org/repo debian-stretch/main amd64 Packages
     release o=Docker,a=debian-stretch,n=debian-stretch,l=Docker APT
Repository,c=main,b=amd64
     origin apt.dockerproject.org
 500 https://packages.chef.io/repos/apt/stable jessie/main i386 Packages
     release o=Artifactory,a=jessie,n=jessie,l=Artifactory,c=main,b=i386
     origin packages.chef.io
 500 https://packages.chef.io/repos/apt/stable jessie/main amd64 Packages
     release o=Artifactory,a=jessie,n=jessie,l=Artifactory,c=main,b=amd64
     origin packages.chef.io
 500 http://security.debian.org/debian-security wheezy/updates/main i386
Packages
     release
v=7.0,o=Debian,a=oldstable,n=wheezy,l=Debian-Security,c=main,b=i386
     origin security.debian.org
 500 http://security.debian.org/debian-security wheezy/updates/main
amd64 Packages
     release
v=7.0,o=Debian,a=oldstable,n=wheezy,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
   1 http://ftp.debian.org/debian experimental/non-free i386 Packages
     release
o=Debian,a=experimental,n=experimental,l=Debian,c=non-free,b=i386
     origin ftp.debian.org
   1 http://ftp.debian.org/debian experimental/non-free amd64 Packages
     release
o=Debian,a=experimental,n=experimental,l=Debian,c=non-free,b=amd64
     origin ftp.debian.org
   1 http://ftp.debian.org/debian experimental/contrib i386 Packages
     release
o=Debian,a=experimental,n=experimental,l=Debian,c=contrib,b=i386
     origin ftp.debian.org
   1 http://ftp.debian.org/debian experimental/contrib amd64 Packages
     release
o=Debian,a=experimental,n=experimental,l=Debian,c=contrib,b=amd64
     origin ftp.debian.org
   1 http://ftp.debian.org/debian experimental/main i386 Packages
     release o=Debian,a=experimental,n=experimental,l=Debian,c=main,b=i386
     origin ftp.debian.org
   1 http://ftp.debian.org/debian experimental/main amd64 Packages
     release o=Debian,a=experimental,n=experimental,l=Debian,c=main,b=amd64
     origin ftp.debian.org
   1 http://httpredir.debian.org/debian experimental/main i386 Packages
     release o=Debian,a=experimental,n=experimental,l=Debian,c=main,b=i386
     origin httpredir.debian.org
   1 http://httpredir.debian.org/debian experimental/main amd64 Packages
     release o=Debian,a=experimental,n=experimental,l=Debian,c=main,b=amd64
     origin httpredir.debian.org
 990 http://ftp.fr.debian.org/debian unstable/non-free i386 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free,b=i386
     origin ftp.fr.debian.org
 990 http://ftp.fr.debian.org/debian unstable/non-free amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free,b=amd64
     origin ftp.fr.debian.org
 990 http://ftp.fr.debian.org/debian unstable/contrib i386 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=contrib,b=i386
     origin ftp.fr.debian.org
 990 http://ftp.fr.debian.org/debian unstable/contrib amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=contrib,b=amd64
     origin ftp.fr.debian.org
 990 http://ftp.fr.debian.org/debian unstable/main i386 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=main,b=i386
     origin ftp.fr.debian.org
 990 http://ftp.fr.debian.org/debian unstable/main amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=main,b=amd64
     origin ftp.fr.debian.org
 500 http://ftp.fr.debian.org/debian testing/non-free i386 Packages
     release o=Debian,a=testing,n=stretch,l=Debian,c=non-free,b=i386
     origin ftp.fr.debian.org
 500 http://ftp.fr.debian.org/debian testing/non-free amd64 Packages
     release o=Debian,a=testing,n=stretch,l=Debian,c=non-free,b=amd64
     origin ftp.fr.debian.org
 500 http://ftp.fr.debian.org/debian testing/contrib i386 Packages
     release o=Debian,a=testing,n=stretch,l=Debian,c=contrib,b=i386
     origin ftp.fr.debian.org
 500 http://ftp.fr.debian.org/debian testing/contrib amd64 Packages
     release o=Debian,a=testing,n=stretch,l=Debian,c=contrib,b=amd64
     origin ftp.fr.debian.org
 500 http://ftp.fr.debian.org/debian testing/main i386 Packages
     release o=Debian,a=testing,n=stretch,l=Debian,c=main,b=i386
     origin ftp.fr.debian.org
 500 http://ftp.fr.debian.org/debian testing/main amd64 Packages
     release o=Debian,a=testing,n=stretch,l=Debian,c=main,b=amd64
     origin ftp.fr.debian.org
Pinned packages:
-*- -*- -*- -*- -*-
   sources.list
-*- -*- -*- -*- -*-
deb [arch=amd64,i386] http://ftp.fr.debian.org/debian/ testing main
contrib non-free
deb-src http://ftp.fr.debian.org/debian/ testing main contrib non-free
deb [arch=amd64,i386] http://ftp.fr.debian.org/debian/ unstable main
contrib non-free
deb-src http://ftp.fr.debian.org/debian/ unstable main contrib non-free
deb [arch=amd64,i386] http://security.debian.org testing/updates main
contrib non-free
deb-src http://security.debian.org testing/updates main contrib non-free
deb [arch=amd64,i386] http://httpredir.debian.org/debian experimental main
deb [arch=amd64,i386] http://ftp.debian.org/debian experimental main
contrib non-free
deb http://security.debian.org/debian-security wheezy/updates main
-*- -*- -*- -*- -*-
 /etc/lsb_release
-*- -*- -*- -*- -*-
- none

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'oldstable'),
(1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages lsb-release depends on:
ii  distro-info-data  0.32
pn  python3:any       <none>

Versions of packages lsb-release recommends:
ii  apt  1.3.1

Versions of packages lsb-release suggests:
pn  lsb  <none>

-- no debconf information


Reply to: