summaryrefslogtreecommitdiffstats
path: root/cyruslib.py
diff options
context:
space:
mode:
Diffstat (limited to 'cyruslib.py')
-rw-r--r--cyruslib.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/cyruslib.py b/cyruslib.py
index 460cf82..85d7e63 100644
--- a/cyruslib.py
+++ b/cyruslib.py
@@ -673,16 +673,20 @@ class CYRUS:
continue
for annotation in annotations:
+ annotation = annotation.strip()
- folder = annotation.split()[0].replace('"','')
+ if not annotation[0] == '"':
+ folder = annotation.split('"')[0].replace('"','').strip()
+ key = annotation.split('"')[1].replace('"','').replace("'","").strip()
+ _annot = annotation.split('(')[1].split(')')[0].strip()
+ else:
+ folder = annotation.split('"')[1].replace('"','').strip()
+ key = annotation.split('"')[3].replace('"','').replace("'","").strip()
+ _annot = annotation.split('(')[1].split(')')[0].strip()
if not ann.has_key(folder):
ann[folder] = {}
- key = annotation.split()[1].replace('"','').replace("'","")
-
- _annot = annotation.split('(')[1].split(')')[0]
-
try:
value_priv = _annot[(_annot.index('"value.priv"')+len('"value.priv"')):_annot.index('"size.priv"')].strip()
except ValueError, errmsg: