[PATCH 01/15] Raise exceptions as defined in PEP 3109

Nicolas Sebrecht nicolas.s-dev at laposte.net
Tue May 10 01:52:51 BST 2016


On Tue, May 10, 2016 at 01:18:23AM +0200, Łukasz Żarnowiecki wrote:

> Signed-off-by: Łukasz Żarnowiecki <dolohow at outlook.com>
> ---
>  offlineimap/CustomConfig.py             |  4 ++--
>  offlineimap/accounts.py                 |  4 ++--
>  offlineimap/folder/Gmail.py             |  8 ++++----
>  offlineimap/folder/GmailMaildir.py      |  6 +++---
>  offlineimap/folder/IMAP.py              |  7 +++----
>  offlineimap/folder/LocalStatus.py       |  4 ++--
>  offlineimap/folder/LocalStatusSQLite.py |  4 ++--
>  offlineimap/folder/Maildir.py           | 15 +++++++--------
>  offlineimap/folder/UIDMaps.py           |  4 ++--
>  offlineimap/imaplibutil.py              |  2 +-
>  offlineimap/imapserver.py               |  8 ++++----
>  offlineimap/repository/IMAP.py          |  5 +++--
>  offlineimap/repository/__init__.py      | 10 ++++++----
>  13 files changed, 41 insertions(+), 40 deletions(-)
> 
> diff --git a/offlineimap/CustomConfig.py b/offlineimap/CustomConfig.py
> index 44cfcab..71fa675 100644
> --- a/offlineimap/CustomConfig.py
> +++ b/offlineimap/CustomConfig.py
> @@ -75,8 +75,8 @@ class CustomConfigParser(SafeConfigParser):
>              val = self.get(section, option).strip()
>              return re.split(separator_re, val)
>          except re.error as e:
> -            raise Error("Bad split regexp '%s': %s" % \
> -              (separator_re, e)), None, exc_info()[2]
> +            raise Error("Bad split regexp '%s': %s" %
> +              (separator_re, e)).with_traceback(exc_info()[2])

I don't think this syntax is Python 2 compatible.

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list