From 8483272ee0109341b11d7b0f1ebf6931d01c7623 Mon Sep 17 00:00:00 2001 From: terrtia Date: Wed, 13 Mar 2024 14:39:31 +0100 Subject: [PATCH] chg: [global module] perf --- bin/modules/Global.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/modules/Global.py b/bin/modules/Global.py index 3f473aed..763a7b89 100755 --- a/bin/modules/Global.py +++ b/bin/modules/Global.py @@ -81,10 +81,9 @@ class Global(AbstractModule): def compute(self, message, r_result=False): # TODO move OBJ ID sanitization to importer # Recovering the streamed message infos - gzip64encoded = message if self.obj.type == 'item': - if gzip64encoded: + if message: # Creating the full filepath filename = os.path.join(self.ITEMS_FOLDER, self.obj.id) @@ -97,7 +96,7 @@ class Global(AbstractModule): else: # Decode compressed base64 - decoded = base64.standard_b64decode(gzip64encoded) + decoded = base64.standard_b64decode(message) new_file_content = self.gunzip_bytes_obj(filename, decoded) # TODO REWRITE ME