mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target: fix new line handling in os_version
Use convert_new_lines() before stripping out '\n' character from OS version strings to ensure no stray '\r's are left in.
This commit is contained in:
parent
fec0868734
commit
8e1dc1359a
@ -809,7 +809,7 @@ class LinuxTarget(Target):
|
|||||||
for vf in version_files:
|
for vf in version_files:
|
||||||
name = self.path.basename(vf)
|
name = self.path.basename(vf)
|
||||||
output = self.read_value(vf)
|
output = self.read_value(vf)
|
||||||
os_version[name] = output.strip().replace('\n', ' ')
|
os_version[name] = convert_new_lines(output.strip()).replace('\n', ' ')
|
||||||
except TargetError:
|
except TargetError:
|
||||||
raise
|
raise
|
||||||
return os_version
|
return os_version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user