read only the first line if more lines
This commit is contained in:
parent
21f279a659
commit
942bcc75a5
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ def get_os_info():
|
||||||
path_to_file = distro_info[distro_name]
|
path_to_file = distro_info[distro_name]
|
||||||
if os.path.exists(path_to_file):
|
if os.path.exists(path_to_file):
|
||||||
fd = open(path_to_file)
|
fd = open(path_to_file)
|
||||||
text = fd.read().strip()
|
text = fd.readline().strip() #get only first line
|
||||||
fd.close()
|
fd.close()
|
||||||
if path_to_file.endswith('version'):
|
if path_to_file.endswith('version'):
|
||||||
# sourcemage_version has all the info we need
|
# sourcemage_version has all the info we need
|
||||||
|
|
Loading…
Add table
Reference in a new issue