403b09
From 89bfc7c0a4b08c873e5c8b8dfad54cf895b742cd Mon Sep 17 00:00:00 2001
403b09
From: Martin Basti <mbasti@redhat.com>
403b09
Date: Fri, 29 Jul 2016 16:46:09 +0200
403b09
Subject: [PATCH] idrange: fix unassigned global variable
403b09
403b09
Global variable '_dcerpc_bindings_installed' is in some cases used
403b09
before assigment. This patch ensures that _dcerpc_bindings_installed is
403b09
always initialized.
403b09
403b09
https://fedorahosted.org/freeipa/ticket/6082
403b09
403b09
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
403b09
---
403b09
 ipaserver/plugins/idrange.py | 3 +++
403b09
 1 file changed, 3 insertions(+)
403b09
403b09
diff --git a/ipaserver/plugins/idrange.py b/ipaserver/plugins/idrange.py
403b09
index ccd67995e5b42634387e1064e7c819b711f3ef99..3e9db0b6b734513547423901a8b3212b3cee9147 100644
403b09
--- a/ipaserver/plugins/idrange.py
403b09
+++ b/ipaserver/plugins/idrange.py
403b09
@@ -35,6 +35,9 @@ if api.env.in_server and api.env.context in ['lite', 'server']:
403b09
         _dcerpc_bindings_installed = True
403b09
     except ImportError:
403b09
         _dcerpc_bindings_installed = False
403b09
+else:
403b09
+    _dcerpc_bindings_installed = False
403b09
+
403b09
 
403b09
 ID_RANGE_VS_DNA_WARNING = """=======
403b09
 WARNING:
403b09
-- 
403b09
2.7.4
403b09