Unverified Commit cb7a9ca3 authored by myhloli's avatar myhloli Committed by GitHub

Merge pull request #98 from icecraft/fix/lost_text

fix: os module has no method named "exit"
parents 8a179269 43843b27
...@@ -72,7 +72,7 @@ def _do_parse(pdf_file_name, pdf_bytes, model_list, parse_method, image_writer, ...@@ -72,7 +72,7 @@ def _do_parse(pdf_file_name, pdf_bytes, model_list, parse_method, image_writer,
pipe = OCRPipe(pdf_bytes, model_list, image_writer, is_debug=True) pipe = OCRPipe(pdf_bytes, model_list, image_writer, is_debug=True)
else: else:
print("unknow parse method") print("unknow parse method")
os.exit(1) sys.exit(1)
pipe.pipe_classify() pipe.pipe_classify()
pipe.pipe_parse() pipe.pipe_parse()
...@@ -114,7 +114,7 @@ def cli(): ...@@ -114,7 +114,7 @@ def cli():
def json_command(json, method): def json_command(json, method):
if not json.startswith("s3://"): if not json.startswith("s3://"):
print("usage: python magipdf.py --json s3://some_bucket/some_path") print("usage: python magipdf.py --json s3://some_bucket/some_path")
os.exit(1) sys.exit(1)
def read_s3_path(s3path): def read_s3_path(s3path):
bucket, key = parse_s3path(s3path) bucket, key = parse_s3path(s3path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment