pkgme.info_elements.Distribution.get_default fails if /etc/lsb-release is missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pkgme |
Fix Released
|
High
|
Jonathan Lange |
Bug Description
| In [1]: from pkgme.info_elements import Distribution
| In [2]: e = Distribution()
| In [3]: e.get_default()
| -------
| IOError Traceback (most recent call last)
|
| /tmp/pkgme/<ipython console> in <module>()
|
| /tmp/pkgme/
| 148 @classmethod
| 149 def get_default(cls):
| --> 150 with open('/
| 151 release_keys = dict(
| 152 line.strip(
|
| IOError: [Errno 2] No such file or directory: '/etc/lsb-release'
pkgme fails on Debian Sid due to missing /etc/lsb-release file, attached patch
fixes it (it returns UNRELEASED if the file is missing)
Related branches
- James Westby: Approve
-
Diff: 97 lines (+41/-6)3 files modifiedNEWS.txt (+9/-0)
pkgme/info_elements.py (+12/-4)
pkgme/tests/test_info_elements.py (+20/-2)
Changed in pkgme: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in pkgme: | |
status: | Triaged → In Progress |
importance: | High → Critical |
importance: | Critical → High |
assignee: | nobody → Jonathan Lange (jml) |
Changed in pkgme: | |
status: | In Progress → Fix Released |