mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-26 10:21:09 +00:00
Simplify some code.
This commit is contained in:
parent
ab78b51a9f
commit
ea9ee6d0a7
@ -41,9 +41,9 @@ def system_distribution():
|
|||||||
return line[17:]
|
return line[17:]
|
||||||
else:
|
else:
|
||||||
import commands
|
import commands
|
||||||
output = commands.getoutput('lsb_release -c').split()
|
output = commands.getoutput('lsb_release -cs')
|
||||||
if len(output) == 2:
|
if output:
|
||||||
return output[1]
|
return output
|
||||||
print 'Error: Could not determine what distribution you are running.'
|
print 'Error: Could not determine what distribution you are running.'
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user