mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01: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:]
|
||||
else:
|
||||
import commands
|
||||
output = commands.getoutput('lsb_release -c').split()
|
||||
if len(output) == 2:
|
||||
return output[1]
|
||||
output = commands.getoutput('lsb_release -cs')
|
||||
if output:
|
||||
return output
|
||||
print 'Error: Could not determine what distribution you are running.'
|
||||
return None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user