mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
IPAOptionParser: fix dict comprehension
The statement can be simplified and be more resources friendly Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
This commit is contained in:
parent
7f8d79f637
commit
f18ce01355
@ -114,7 +114,10 @@ class IPAOptionParser(OptionParser):
|
|||||||
Returns all options except those with sensitive=True in the same
|
Returns all options except those with sensitive=True in the same
|
||||||
fashion as parse_args would
|
fashion as parse_args would
|
||||||
"""
|
"""
|
||||||
all_opts_dict = dict([ (o.dest, o) for o in self._get_all_options() if hasattr(o, 'sensitive') ])
|
all_opts_dict = {
|
||||||
|
o.dest: o for o in self._get_all_options()
|
||||||
|
if hasattr(o, 'sensitive')
|
||||||
|
}
|
||||||
safe_opts_dict = {}
|
safe_opts_dict = {}
|
||||||
|
|
||||||
for option, value in opts.__dict__.items():
|
for option, value in opts.__dict__.items():
|
||||||
|
Loading…
Reference in New Issue
Block a user