Only log insecure key manager warning once
We currently log a warning message every time the key manager is instantiated. This changes that to log a warning only one time. Change-Id: Ia24808396eb0e2d43c6dc6631384a254b2ee2472
This commit is contained in:
parent
5bb68e49d3
commit
0df3d7a9d9
@ -63,9 +63,14 @@ class ConfKeyManager(key_manager.KeyManager):
|
||||
for each method are handled as specified by the key manager interface.
|
||||
"""
|
||||
|
||||
warning_logged = False
|
||||
|
||||
def __init__(self, configuration):
|
||||
LOG.warning(_LW('This key manager is insecure and is not recommended '
|
||||
'for production deployments'))
|
||||
if not ConfKeyManager.warning_logged:
|
||||
LOG.warning(_LW('This key manager is insecure and is not '
|
||||
'recommended for production deployments'))
|
||||
ConfKeyManager.warning_logged = True
|
||||
|
||||
super(ConfKeyManager, self).__init__(configuration)
|
||||
|
||||
self.conf = configuration
|
||||
|
Loading…
x
Reference in New Issue
Block a user