Fix the error number constant and display a log warning.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -117,10 +117,11 @@ class Setting(object):
|
||||
with open(path, 'w') as file_object:
|
||||
file_object.write(cls.dump_data())
|
||||
except IOError as exception:
|
||||
if exception.errno == errno.IONENT:
|
||||
# The path for the configuration files doesn't exist.
|
||||
# We can't save the backup file.
|
||||
pass
|
||||
if exception.errno == errno.ENOENT:
|
||||
logger.warning(
|
||||
'The path to the configuration file doesn\'t '
|
||||
'exist. It is not possible to save the backup file.'
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def save_last_known_good(cls):
|
||||
|
||||
Reference in New Issue
Block a user