mirror of
https://git.freebsd.org/ports.git
synced 2025-06-14 09:10:32 -04:00
OfflineIMAP changed its maintainer again, now it is Sebastian Spaeth. There are too many changes since 6.4.0, so they won't be listed here for this update. Feature safe: yes
37 lines
1.3 KiB
Text
37 lines
1.3 KiB
Text
From b28b53c1367352eb9f634d4f23d13142b9bbbd4d Mon Sep 17 00:00:00 2001
|
|
From: Eygene Ryabinkin <rea@codelabs.ru>
|
|
Date: Sun, 19 Feb 2012 17:35:28 +0400
|
|
Subject: [PATCH] Imaplib2: work around the Python bug 3473
|
|
|
|
It was not possible to pass anything, but (*args, **kwargs)
|
|
before the following bug was solved,
|
|
http://bugs.python.org/issue3473
|
|
so we can't say (*args, key1 = value1, key2 = value2), but we
|
|
should pack keys and values to the dictionary and pass it
|
|
with **kwargs.
|
|
|
|
Python <= 2.5 have this unfixed, so we should fix this in our code.
|
|
|
|
Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
|
|
---
|
|
offlineimap/imaplib2.py | 4 +++-
|
|
1 files changed, 3 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/offlineimap/imaplib2.py b/offlineimap/imaplib2.py
|
|
index ffa2676..ed978be 100644
|
|
--- a/offlineimap/imaplib2.py
|
|
+++ b/offlineimap/imaplib2.py
|
|
@@ -1591,7 +1591,9 @@ class IMAP4(object):
|
|
def _simple_command(self, name, *args, **kw):
|
|
|
|
if 'callback' in kw:
|
|
- self._command(name, *args, callback=self._command_completer, cb_arg=kw, cb_self=True)
|
|
+ # http://bugs.python.org/issue3473
|
|
+ kwargs = {'callback':self._command_completer, 'cb_arg':kw, 'cb_self':True}
|
|
+ self._command(name, *args, **kwargs)
|
|
return (None, None)
|
|
return self._command_complete(self._command(name, *args), kw)
|
|
|
|
--
|
|
1.7.9
|
|
|