diff --git a/autotests/samplefiles/testexternalextractor/main.py b/autotests/samplefiles/testexternalextractor/main.py index 5fa3e78..b3e7631 100755 --- a/autotests/samplefiles/testexternalextractor/main.py +++ b/autotests/samplefiles/testexternalextractor/main.py @@ -1,26 +1,23 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python import sys -import subprocess -import os.path -import os import json extractor_data = json.loads(sys.stdin.read()) def extract(): path = extractor_data.get('path') mimetype = extractor_data.get('mimetype') doc = open(path) return_value = {} return_value['properties'] = {} return_value['properties']['text'] = doc.read() return_value['status'] = 'OK' return_value['error'] = '' print(json.dumps(return_value)) if __name__ == "__main__": extract() diff --git a/autotests/samplefiles/testexternalwriter/main.py b/autotests/samplefiles/testexternalwriter/main.py index ece8fa6..4c46980 100755 --- a/autotests/samplefiles/testexternalwriter/main.py +++ b/autotests/samplefiles/testexternalwriter/main.py @@ -1,26 +1,23 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python import sys -import subprocess -import os.path -import os import json writer_data = json.loads(sys.stdin.read()) def write(): path = writer_data.get('path') mimetype = writer_data.get('mimetype', '') properties = writer_data.get('properties', '') output = open(path, 'w') output.write(json.dumps(properties)) return_status = {} return_status['status'] = 'OK' return_status['error'] = '' print(json.dumps(return_status)) if __name__ == "__main__": write()