def _load_uuid(hass, filename=UPDATER_UUID_FILE):
 try:
  with open(hass.config.path(filename)) as fptr:
   jsonf = json.loads(fptr.read())
   return uuid.UUID(jsonf['uuid'], version=4).hex
 except (ValueError, AttributeError):
  return None
 except FileNotFoundError:
  return _create_uuid(hass, filename)

def _load_uuid ( hass , filename = UPDATER_UUID_FILE ) : try : with open ( hass . config . path ( filename ) ) as fptr : jsonf = json . loads ( fptr . read ( ) ) return uuid . UUID ( jsonf [ 'uuid' ] , version = 4 ) . hex except ( ValueError , AttributeError ) : return None except FileNotFoundError : return _create_uuid ( hass , filename )
load uuid from a file or return none .