From 4b32d62fe9a5c881c7e0a2ba736a9f2761b1c0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Thu, 3 Sep 2020 20:38:05 +0200 Subject: [PATCH] six: changed offlineimap/folder/GmailMaildir.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch removes the library six, compatible with python2. I need change this re-raise call. Signed-off-by: Rodolfo García Peñas (kix) --- offlineimap/folder/GmailMaildir.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/offlineimap/folder/GmailMaildir.py b/offlineimap/folder/GmailMaildir.py index 395b7a3..4114dd4 100644 --- a/offlineimap/folder/GmailMaildir.py +++ b/offlineimap/folder/GmailMaildir.py @@ -18,8 +18,6 @@ import os from sys import exc_info -import six - import offlineimap.accounts from offlineimap import OfflineImapError from offlineimap import imaputil @@ -181,11 +179,10 @@ class GmailMaildirFolder(MaildirFolder): try: os.rename(tmppath, filepath) except OSError as e: - six.reraise(OfflineImapError, - OfflineImapError("Can't rename file '%s' to '%s': %s" % - (tmppath, filepath, e[1]), - OfflineImapError.ERROR.FOLDER), - exc_info()[2]) + raise OfflineImapError("Can't rename file '%s' to '%s': %s" % + (tmppath, filepath, e[1]), + OfflineImapError.ERROR.FOLDER, + exc_info()[2]) # If utime_from_header=true, we don't want to change the mtime. if self._utime_from_header and mtime: