Fixed bug in get_distribution_and_version
* Added exception handling for the case where the lsb_release command doesn't return expected value Change-Id: Id01ed6588f55b2c7c4ca8dfd6050217a9be882d4
This commit is contained in:
@@ -578,5 +578,8 @@ class LinuxClient(RemoteInstanceClient):
|
||||
|
||||
result = self.ssh_client.execute_command('lsb_release -d')
|
||||
if result:
|
||||
distro = result.stdout.split(':')[1]
|
||||
return distro
|
||||
try:
|
||||
distro = result.stdout.split(':')[1]
|
||||
return distro
|
||||
except IndexError:
|
||||
return ''
|
||||
|
||||
Reference in New Issue
Block a user