From 34b3cc32861ca276514002f57f221b0dd92c208b Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 22 Aug 2018 12:25:04 -0400 Subject: [PATCH] Fix the error number constant and display a log warning. Signed-off-by: Roberto Rosario --- mayan/apps/smart_settings/classes.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mayan/apps/smart_settings/classes.py b/mayan/apps/smart_settings/classes.py index 374deb6f6f..301e818fa9 100644 --- a/mayan/apps/smart_settings/classes.py +++ b/mayan/apps/smart_settings/classes.py @@ -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):