-
Bug
-
Resolution: Unresolved
-
Undefined
-
rhel-8.10, rhel-9.6
-
leapp-0.19.0-3.el8_10
-
No
-
Moderate
-
rhel-upgrades
-
Pass
-
RegressionOnly
-
Unspecified
-
Unspecified
-
Unspecified
-
-
All
-
None
When specifying new command option for leapp using @command_opt decorator, it's possible to specify the default value. However, the value is ignored nowadays if it's falsy (empty string, empty list, ...) - and then it's always `None` instead, like in case the default value is not specified. This is unexpected behaviour and generates additional requirements in the code defining leapp (sub)commands.
Example of defining default that is ignored now:
@command('upgrade', help='Upgrade the current system to the next available major version.') @command_opt('foo', action='append', default=[],help='Lorem ipsum') ... snip ....
Expected behaviour:
Respect the set default even when wanting empty string or empty list.
- links to
-
RHBA-2025:149817 leapp update