summaryrefslogtreecommitdiffstats
path: root/themis
diff options
context:
space:
mode:
Diffstat (limited to 'themis')
-rw-r--r--themis/config/utils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/themis/config/utils.py b/themis/config/utils.py
index 0985f67..77aa3a3 100644
--- a/themis/config/utils.py
+++ b/themis/config/utils.py
@@ -43,10 +43,14 @@ def get_categories_from_ocr_code(ocr_code, doctype):
continue
if line.count('|') == 2:
code, category, subcategory = line.strip().split('|')
+ folder = None
+ if line.count('|') == 3:
+ code, category, subcategory, folder = line.strip().split('|')
+ subcategory = subcategory or None
elif line.count('|') == 1:
code, category = line.strip().split('|')
- subcategory = None
+ subcategory, folder = None, None
if code == ocr_code:
- return category, subcategory
+ return category, subcategory, folder
return None