From 792237ac3e90c8141d64dba92a38a7e349a2d4a9 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Sun, 3 Mar 2019 20:00:56 +0100 Subject: [PATCH] Outputpath is joined with absolute path. --- processor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/processor.py b/processor.py index 406d770..f186e03 100644 --- a/processor.py +++ b/processor.py @@ -19,7 +19,11 @@ OUTPUT_SIZES = [ def processImage(file, outputPath=None): - outputPath = args.output if 'args.output' in globals() else os.path.join(OUTPUT_FALLBACK, 'output') + if outputPath == None: + outputPath = args.output if 'args.output' in globals() else os.path.join(OUTPUT_FALLBACK, 'output') + else: + outputPath = os.path.join(OUTPUT_FALLBACK, outputPath) + print('outputpath', outputPath) image = Image.open(file) fileID = uuid.uuid4().hex