From 190b67b17a4937b90c9dff5fcf65eab7fc6b037f Mon Sep 17 00:00:00 2001 From: Fisch Date: Tue, 3 Dec 2024 17:23:36 +0100 Subject: [PATCH] fix return output when using variablename --- imagegenerator/generate.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/imagegenerator/generate.py b/imagegenerator/generate.py index 1b0b6c4..5933805 100644 --- a/imagegenerator/generate.py +++ b/imagegenerator/generate.py @@ -57,7 +57,10 @@ elif args.format=='nodered': #Nodered Binary output_col_preR="" output_col_write_binary_flag=True output_col_post="\\\n" - output_post="\";\nreturn msg;" + if (args.variablename): + output_post="\";" + else: + output_post="\";\nreturn msg;" elif args.format=='nodered_int': #Nodered Int output_pre=variablename+"=\"\\\n" output_col_preL="" @@ -65,7 +68,10 @@ elif args.format=='nodered_int': #Nodered Int output_col_preR="" output_col_write_int_flag=True output_col_post="," - output_post="\";\nreturn msg;" + if (args.variablename): + output_post="\";" + else: + output_post="\";\nreturn msg;"