mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-02 20:30:26 -06:00
LGTM: Fix multiple use before assignment
- Move assignment before try/finally block - Add raise to indicate control flow change - Add default value https://pagure.io/freeipa/issue/7344 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
1 parent
dc599e0797
commit
73ee9ff40e
9 files changed
+45
-25
No files matched your search
@@ -600,8 +600,9 @@ def modify_sssd_conf(host, domain, mod_dict, provider='ipa',
|
||||
:param provider_subtype: backend subtype (e.g. id or sudo), will be added
|
||||
to the domain config if not present
|
||||
"""
|
||||
fd, temp_config_file = tempfile.mkstemp()
|
||||
os.close(fd)
|
||||
try:
|
||||
temp_config_file = tempfile.mkstemp()[1]
|
||||
current_config = host.transport.get_file_contents(paths.SSSD_CONF)
|
||||
|
||||
with open(temp_config_file, 'wb') as f:
|
||||
|
||||
Reference in new issue
Block a user