From 755bf2bf1591852f11f7e346a6ff15d7060de0fd Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 2 Nov 2015 16:43:29 +0100 Subject: [PATCH] [FIX] Unnecessary escaping --- fetchmail_attach_from_folder/model/fetchmail_server.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fetchmail_attach_from_folder/model/fetchmail_server.py b/fetchmail_attach_from_folder/model/fetchmail_server.py index a7dfe2f1f..f584f44fe 100644 --- a/fetchmail_attach_from_folder/model/fetchmail_server.py +++ b/fetchmail_attach_from_folder/model/fetchmail_server.py @@ -70,7 +70,7 @@ class fetchmail_server(models.Model): connection = this.connect() for folder in this.folder_ids.filtered('active'): - this.with_context(safe_eval(folder.context or {}))\ + this.with_context(safe_eval(folder.context or '{}'))\ .handle_folder(connection, folder) connection.close() @@ -221,13 +221,13 @@ class fetchmail_server(models.Model): connection.select() for folder in this.folder_ids.filtered('active'): try: - folder_context = safe_eval(folder.context or {}) + folder_context = safe_eval(folder.context or '{}') except Exception, e: raise exceptions.ValidationError( - _('Invalid context \"%s\": %s') % (folder.context, e)) + _('Invalid context "%s": %s') % (folder.context, e)) if not isinstance(folder_context, dict): raise exceptions.ValidationError( - _('Context \"%s\" is not a dictionary.') % + _('Context "%s" is not a dictionary.') % folder.context) if connection.select(folder.path)[0] != 'OK': raise exceptions.ValidationError(