mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-25 06:38:02 -05: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:
1 parent
7f8d79f637
commit
f18ce01355
1 file changed
+4
-1
+4
-1
@@ -114,7 +114,10 @@ class IPAOptionParser(OptionParser):
|
||||
Returns all options except those with sensitive=True in the same
|
||||
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 = {}
|
||||
|
||||
for option, value in opts.__dict__.items():
|
||||
|
||||
Reference in new issue
Block a user