Fix the dist_ver bug. Covert the string to an int.

This commit is contained in:
Chris Johns 2013-04-30 17:23:18 +10:00
parent 1aade53a43
commit 49c668c3bf

View File

@ -69,14 +69,14 @@ def load():
# Works for LSB distros
distro = platform.dist()[0]
distro_ver = platform.dist()[2]
distro_ver = int(platform.dist()[2])
# Non LSB - fail over to issue
if distro == '':
try:
issue = open('/etc/issue').read()
distro = issue.split(' ')[0]
distro_ver = issue.split(' ')[2]
distro_ver = int(issue.split(' ')[2])
except:
pass