diff options
author | Ryan Kavanagh <rak@debian.org> | 2012-10-09 23:06:52 +0100 |
---|---|---|
committer | Ryan Kavanagh <rak@debian.org> | 2012-10-09 23:06:52 +0100 |
commit | 9f84116f54dad617acd79bda44f6f854f5d31108 (patch) | |
tree | 7ff861934e535851c99829e0e51baff7a539dcb4 | |
parent | Make Control-t our screen escape. Time to relearn all of that blasted muscle ... (diff) |
I misrefactored offlineimap.py to deal with versions
-rw-r--r-- | .offlineimap.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/.offlineimap.py b/.offlineimap.py index 89a81bd..b5a73dd 100644 --- a/.offlineimap.py +++ b/.offlineimap.py @@ -4,24 +4,6 @@ import re prioritized = ['INBOX', 'QueensU.INBOX'] def mycmp(x, y): - if offlineimap.__version__ < '6.4': - return mycmp_oldofflineimap(x, y) - else: - return mycmp_newofflineimap(x, y) - -def mycmp_oldofflineimap(x, y): - for prefix in prioritized: - xsw = x.startswith(prefix) - ysw = y.startswith(prefix) - if xsw and ysw: - return cmp(x, y) - elif xsw: - return -1 - elif ysw: - return +1 - return cmp(x, y) - -def mycmp_newofflineimap(x, y): for prefix in prioritized: if offlineimap.__version__ < '6.4': xsw = x.startswith(prefix) |