diff options
| author | Jaime Resano <Jaime.Resano-Aisa@qt.io> | 2025-01-21 11:03:20 +0100 |
|---|---|---|
| committer | Jaime Resano <Jaime.Resano-Aisa@qt.io> | 2025-01-21 17:57:57 +0100 |
| commit | 8a1950f66da618d59e622411604e09c9817d3b33 (patch) | |
| tree | 5182e74679fc9b0d6f7395d4d47ef2c0489170de /sources/pyside-tools/deploy.py | |
| parent | e391b6a0192a21a96589721eba13a8eba3ad0c70 (diff) | |
pyside6-deploy: 1. Minor refactoring
Just adding some type hints and a bit of code cleanup
None of the existing logic should be affected by this change.
Task-number: PYSIDE-1612
Pick-to: 6.8
Change-Id: I42175426a03dc463b8da82aa560c3f13ab842392
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside-tools/deploy.py')
| -rw-r--r-- | sources/pyside-tools/deploy.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sources/pyside-tools/deploy.py b/sources/pyside-tools/deploy.py index 477fb0e6b..c26c8c627 100644 --- a/sources/pyside-tools/deploy.py +++ b/sources/pyside-tools/deploy.py @@ -64,7 +64,7 @@ HELP_MODE = dedent(""" def main(main_file: Path = None, name: str = None, config_file: Path = None, init: bool = False, loglevel=logging.WARNING, dry_run: bool = False, keep_deployment_files: bool = False, force: bool = False, extra_ignore_dirs: str = None, extra_modules_grouped: str = None, - mode: bool = False): + mode: str = None): logging.basicConfig(level=loglevel) @@ -121,9 +121,7 @@ def main(main_file: Path = None, name: str = None, config_file: Path = None, ini config.modules += list(set(extra_modules).difference(set(config.modules))) - # writing config file - # in the case of --dry-run, we use default.spec as reference. Do not save the changes - # for --dry-run + # Do not save the config changes if --dry-run is specified if not dry_run: config.update_config() @@ -163,8 +161,9 @@ def main(main_file: Path = None, name: str = None, config_file: Path = None, ini except Exception: print(f"[DEPLOY] Exception occurred: {traceback.format_exc()}") finally: - if config.generated_files_path and config: - finalize(config=config) + if config.generated_files_path: + if not dry_run: + finalize(config=config) if not keep_deployment_files: cleanup(config=config) |
