aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@debian.org>2012-09-30 11:55:38 +0100
committerRyan Kavanagh <rak@debian.org>2012-09-30 11:59:22 +0100
commit596a96fb5e5b069548055488c37eea87ce4b7fd9 (patch)
treefb935eb3740ba110c1515763c3d0cbbf6eb99e18
parentProgrammatically decide on the version of mycmp to use based on offlineimap._... (diff)
Programmatically decide on the version of mycmp to use based on offlineimap.__version__
Diffstat (limited to '')
-rw-r--r--.offlineimap.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/.offlineimap.py b/.offlineimap.py
index eb6a9bf..89a81bd 100644
--- a/.offlineimap.py
+++ b/.offlineimap.py
@@ -23,8 +23,12 @@ def mycmp_oldofflineimap(x, y):
def mycmp_newofflineimap(x, y):
for prefix in prioritized:
- xsw = x.visiblename.startswith(prefix)
- ysw = y.visiblename.startswith(prefix)
+ if offlineimap.__version__ < '6.4':
+ xsw = x.startswith(prefix)
+ ysw = y.startswith(prefix)
+ else:
+ xsw = x.visiblename.startswith(prefix)
+ ysw = y.visiblename.startswith(prefix)
if xsw and ysw:
return cmp(x, y)
elif xsw: