Changeset 450
- Timestamp:
- 27-09-09 16:21:37 (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
moap/util/distro.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r448 r450 1 2009-09-27 Thomas Vander Stichele <thomas at apestaart dot org> 2 3 * moap/util/distro.py: 4 Add a DistroException. 5 Raise it when lsb_release is not present (like on the f11 6 buildslave) 7 1 8 2009-09-25 Thomas Vander Stichele <thomas at apestaart dot org> 2 9 -
trunk/moap/util/distro.py
r287 r450 12 12 Figure out what distribution, architecture and version the user is on. 13 13 """ 14 15 class DistroException(Exception): 16 pass 14 17 15 18 class Distro: … … 67 70 """ 68 71 # start with lsb_release 69 output = commands.getoutput("lsb_release -i") 72 (status, output) = commands.getstatusoutput("lsb_release -i") 73 if os.WIFEXITED(status): 74 ret = os.WEXITSTATUS(status) 75 if ret == 127: 76 raise DistroException('lsb_release binary not found') 77 70 78 if output and output.startswith('Distributor ID:'): 71 79 distributor = output.split(':', 2)[1].strip()
Note: See TracChangeset
for help on using the changeset viewer.
