Added in safety check if details_txt is None

pull/5077/head
David Walters 2017-09-15 16:00:20 +01:00
parent aafe61414e
commit 7b4959125f
1 changed files with 8 additions and 4 deletions

View File

@ -114,6 +114,10 @@ def get_interface_version(mount_point):
mbeds = mbed_lstools.create() mbeds = mbed_lstools.create()
details_txt = mbeds.get_details_txt(mount_point) details_txt = mbeds.get_details_txt(mount_point)
if (details_txt is None):
details_txt = {}
if 'Interface Version' in details_txt: if 'Interface Version' in details_txt:
return details_txt['Interface Version'] return details_txt['Interface Version']