From 4f040d4c68ae6838f36344b896401c2e0ef4b123 Mon Sep 17 00:00:00 2001 From: Oleksii Shevchuk Date: Mon, 12 Mar 2018 17:11:22 +0200 Subject: [PATCH] Preload libs only in debug --- client/gen_python_bootloader.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/gen_python_bootloader.py b/client/gen_python_bootloader.py index 0de581b4..c0ddba9a 100644 --- a/client/gen_python_bootloader.py +++ b/client/gen_python_bootloader.py @@ -64,9 +64,10 @@ if __name__=="__main__": # We are interested to consume embedded modules # This will help to preload some - preload = None - with open(os.path.join('..','additional_imports.py')) as f: - preload = f.read() + preload = '' + if args.debug: + with open(os.path.join('..','additional_imports.py')) as f: + preload = f.read() pupyimporter = pupycompile(pupyimporter, raw=True, debug=args.debug)