From 7ec63b04cf29b7daf5a5587f4e820d254773859f Mon Sep 17 00:00:00 2001 From: Dominik Rumian Date: Apr 01 2022 10:30:40 +0000 Subject: Warning message about deprecated parameter Property --dry-run of parameter clean is deprecated. This commit introduces a warning message informing about this fact. Jira: RHELCMP-8735 Signed-off-by: Dominik Rumian --- diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py index 0f95bdc..9db8794 100644 --- a/pyrpkg/cli.py +++ b/pyrpkg/cli.py @@ -598,7 +598,7 @@ class cliClient(object): "rules. Patterns listed in .git/info/exclude won't" "be removed either.") clean_parser.add_argument( - '--dry-run', '-n', action='store_true', help='Perform a dry-run') + '--dry-run', '-n', dest='dry_run_local', action='store_true', help='Perform a dry-run') clean_parser.add_argument( '-x', action='store_true', help='Do not follow .gitignore and .git/info/exclude rules') @@ -2083,7 +2083,12 @@ class cliClient(object): def clean(self): dry = False useignore = True - if self.args.dry_run: + if self.args.dry_run_local: + self.log.warn('\nProperty \'--dry-run\' is deprecated. Please use' + ' a direct call of \'--dry-run\' like: ' + '\'*pkg --dry-run clean\'.\n') + dry = True + elif self.args.dry_run: dry = True if self.args.x: useignore = False