mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 11:58:55 +00:00
generic_linux: Remove forbidden chars from device_model
Fix for Chromebook Plus and possibly other devices - removes forbidden characters from the device_model such as the null character which was causing a problem with getters getting file names including device_model.
This commit is contained in:
parent
e35d0f2959
commit
f35c444ddb
@ -590,7 +590,8 @@ class BaseLinuxDevice(Device): # pylint: disable=abstract-method
|
||||
def get_device_model(self):
|
||||
if self.file_exists("/proc/device-tree/model"):
|
||||
raw_model = self.execute("cat /proc/device-tree/model")
|
||||
return '_'.join(raw_model.split()[:2])
|
||||
device_model_to_return = '_'.join(raw_model.split()[:2])
|
||||
return device_model_to_return.rstrip(' \t\r\n\0')
|
||||
# Right now we don't know any other way to get device model
|
||||
# info in linux on arm platforms
|
||||
return None
|
||||
|
Loading…
x
Reference in New Issue
Block a user