From 3afcdb13ef1375069b0a901f966f06b45ed8c5c8 Mon Sep 17 00:00:00 2001 From: Jondy Zhao Date: Thu, 1 Feb 2018 16:33:19 +0800 Subject: [PATCH] Refine code --- src/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils.py b/src/utils.py index 4832be22..88bff8c6 100755 --- a/src/utils.py +++ b/src/utils.py @@ -125,9 +125,10 @@ def make_runtime(capsule, output, licfile=None, platform=None): myzip.extract('pyshield.key', output) myzip.extract('pyshield.lic', output) myzip.extract('product.key', output) - myzip.extract('license.lic', output) - if licfile is not None: + if licfile is None: + myzip.extract('license.lic', output) + else: shutil.copy2(licfile, os.path.join(output, 'license.lic')) if platform is None: