Merge "Log exact error during getting value from file"

This commit is contained in:
Zuul 2019-12-06 15:05:01 +00:00 committed by Gerrit Code Review
commit 12852b3e68

View File

@ -257,8 +257,9 @@ def get_value_from_file(filename, converter=None):
return converter(f.read()) if converter else f.read()
except ValueError:
LOG.error('Unable to convert value in %s', filename)
except IOError:
LOG.debug('Unable to access %s', filename)
except IOError as error:
LOG.debug('Unable to access %(filename)s; Error: %(error)s',
{'filename': filename, 'error': error})
def remove_conf_files(cfg_root, uuid):