summaryrefslogtreecommitdiffstats
path: root/ocrloader.py
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2013-10-10 11:44:46 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2013-10-10 11:44:46 (GMT)
commitaa342ff79d69d9d17611baecd8edd472de59af12 (patch)
tree546e7c52f8d14c75888f858ead2e6a8771a87b40 /ocrloader.py
parent19ed550ee36ec1a21ecb8f4d8cf5a32eaaf58e4c (diff)
downloadpfwbged.ocrloader-aa342ff79d69d9d17611baecd8edd472de59af12.zip
pfwbged.ocrloader-aa342ff79d69d9d17611baecd8edd472de59af12.tar.gz
pfwbged.ocrloader-aa342ff79d69d9d17611baecd8edd472de59af12.tar.bz2
rewrite option parsing to use optparse, for compatibility with squeeze
Diffstat (limited to 'ocrloader.py')
-rw-r--r--ocrloader.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/ocrloader.py b/ocrloader.py
index 3c6f7cb..160a71e 100644
--- a/ocrloader.py
+++ b/ocrloader.py
@@ -12,12 +12,13 @@ import tempfile
import time
import shutil
-import argparse
-parser = argparse.ArgumentParser()
-parser.add_argument('--config', default='ocrloader.ini')
-args = parser.parse_args()
+import optparse
-config_filepath = args.config
+parser = optparse.OptionParser()
+parser.add_option('--config', dest='config', default='ocrloader.ini')
+(options, args) = parser.parse_args()
+
+config_filepath = options.config
import logging