mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
Fix the dist_ver bug. Covert the string to an int.
This commit is contained in:
parent
1aade53a43
commit
49c668c3bf
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user