diff options
| author | Ryan Kavanagh <rak@debian.org> | 2012-09-30 11:55:38 +0100 | 
|---|---|---|
| committer | Ryan Kavanagh <rak@debian.org> | 2012-09-30 11:59:22 +0100 | 
| commit | 596a96fb5e5b069548055488c37eea87ce4b7fd9 (patch) | |
| tree | fb935eb3740ba110c1515763c3d0cbbf6eb99e18 | |
| parent | Programmatically 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.py | 8 | 
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:  | 
