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:
Levi Blackstone
2014-09-16 08:02:38 -05:00
parent 29cf8ab22e
commit 57f62a01ff

View File

@@ -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 ''