Handle case where cache file does not exist.

This commit is contained in:
Charles Haley 2013-10-11 15:06:18 +02:00
parent 5572db6fde
commit e599f82f1e

View File

@ -730,6 +730,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
'_metadata_cache.json')
self.known_uuids = defaultdict(dict)
self.known_metadata = {}
if os.path.exists(cache_file_name):
with open(cache_file_name, mode='rb') as fd:
try:
while True: