From dd3e7616cfb37edecac07981b74c44017e4a66c7 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:30:14 +0200 Subject: [PATCH] six: changed offlineimap/folder/LocalStatusSQLite.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 these re-raise calls. Signed-off-by: Rodolfo García Peñas (kix) --- offlineimap/folder/LocalStatusSQLite.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/offlineimap/folder/LocalStatusSQLite.py b/offlineimap/folder/LocalStatusSQLite.py index 3950bb9..5292463 100644 --- a/offlineimap/folder/LocalStatusSQLite.py +++ b/offlineimap/folder/LocalStatusSQLite.py @@ -19,9 +19,6 @@ import os import sqlite3 as sqlite from sys import exc_info from threading import Lock - -import six - from .Base import BaseFolder @@ -117,13 +114,11 @@ class LocalStatusSQLiteFolder(BaseFolder): self._databaseFileLock.registerNewUser() except sqlite.OperationalError as e: # Operation had failed. - six.reraise(UserWarning, - UserWarning( - "cannot open database file '%s': %s.\nYou might" - " want to check the rights to that file and if " - "it cleanly opens with the 'sqlite<3>' command" % - (self.filename, e)), - exc_info()[2]) + raise UserWarning( + "cannot open database file '%s': %s.\nYou might" + " want to check the rights to that file and if " + "it cleanly opens with the 'sqlite<3>' command" % + (self.filename, e), exc_info()[2]) # Test if db version is current enough and if db is readable. try: @@ -351,10 +346,9 @@ class LocalStatusSQLiteFolder(BaseFolder): self.__sql_write('INSERT INTO status (id,flags,mtime,labels) VALUES (?,?,?,?)', (uid, flags, mtime, labels)) except Exception as e: - six.reraise(UserWarning, - UserWarning("%s while inserting UID %s" % - (str(e), str(uid))), - exc_info()[2]) + raise UserWarning("%s while inserting UID %s" % + (str(e), str(uid)), + exc_info()[2]) return uid # Interface from BaseFolder