Ticket #1032 (closed defect: fixed)
printing-config's clusterinfo lookup bypasses local clusterinfo
Reported by: | jdreed | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | Precise Release |
Component: | -- | Keywords: | |
Cc: | Fixed in version: | debathena-printing-config 1.29 | |
Upstream bug: |
Description
It just queries Hesiod, which is Wrong(tm).
Change History
comment:1 Changed 12 years ago by jdreed
- Milestone changed from The Distant Future to Precise Release
comment:2 Changed 12 years ago by amu
You could at least use the Python module behind lsb_release directly.
comment:3 Changed 12 years ago by jdreed
I would use platform.dist() if it wasn't full of lies:
jdreed@jdreed-desktop:~$ lsb_release -sc hardy jdreed@jdreed-desktop:~$ echo -e "import platform\nprint platform.dist()[1]" | python lenny/sid jdreed@jdreed-desktop:~$
comment:4 Changed 12 years ago by jdreed
- Status changed from new to committed
If you don't like the shell stuff, propose something better.
comment:5 Changed 12 years ago by amu
There's a literal lsb_release module; sorry if that was unclear.
$ lsb_release -sc wheezy $ python -c 'import lsb_release; print lsb_release.get_distro_information().get("CODENAME")' wheezy
This approach works at least as far back as lucid; I don't have ready access to anything older. That said, I can't argue too much with working code; it's just a matter of style.
Note: See
TracTickets for help on using
tickets.
How Wrong(tm) is this?