aboutsummaryrefslogtreecommitdiff
path: root/.offlineimap.py
blob: 2d1f5f90f177b4dbc77cf49c1a7b861d4c48d797 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import re

prioritized = ['INBOX', 'QueensU.INBOX']

def mycmp(x, y):
  for prefix in prioritized:
    xsw = x.visiblename.startswith(prefix)
    ysw = y.visiblename.startswith(prefix)
    if xsw and ysw:
      return cmp(x, y)
    elif xsw:
      return -1
    elif ysw:
      return +1
  return cmp(x, y)