Changeset View
Changeset View
Standalone View
Standalone View
cyruslib.py
Show First 20 Lines • Show All 683 Lines • ▼ Show 20 Lines | def getannotation(self, mailbox, pattern='*'): | ||||
folder = annotation.split('"')[0].replace('"','').strip() | folder = annotation.split('"')[0].replace('"','').strip() | ||||
key = annotation.split('"')[1].replace('"','').replace("'","").strip() | key = annotation.split('"')[1].replace('"','').replace("'","").strip() | ||||
_annot = annotation.split('(')[1].split(')')[0].strip() | _annot = annotation.split('(')[1].split(')')[0].strip() | ||||
else: | else: | ||||
folder = annotation.split('"')[1].replace('"','').strip() | folder = annotation.split('"')[1].replace('"','').strip() | ||||
key = annotation.split('"')[3].replace('"','').replace("'","").strip() | key = annotation.split('"')[3].replace('"','').replace("'","").strip() | ||||
_annot = annotation.split('(')[1].split(')')[0].strip() | _annot = annotation.split('(')[1].split(')')[0].strip() | ||||
if not ann.has_key(folder): | if folder not in ann: | ||||
ann[folder] = {} | ann[folder] = {} | ||||
try: | try: | ||||
value_priv = _annot[(_annot.index('"value.priv"')+len('"value.priv"')):_annot.index('"size.priv"')].strip() | value_priv = _annot[(_annot.index('"value.priv"')+len('"value.priv"')):_annot.index('"size.priv"')].strip() | ||||
except ValueError: | except ValueError: | ||||
value_priv = None | value_priv = None | ||||
try: | try: | ||||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |