Fix netconf get_config lock/unlock (#40378)

Lock/unlock the datastore that is given as input for
instead of default to `running`
pull/40381/head
Ganesh Nalawade 7 years ago committed by GitHub
parent a996d4836a
commit de2c1dc241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -72,7 +72,7 @@ def get_config(module, source, filter, lock=False):
try:
locked = False
if lock:
conn.lock(target='running')
conn.lock(target=source)
locked = True
response = conn.get_config(source=source, filter=filter)
@ -81,7 +81,7 @@ def get_config(module, source, filter, lock=False):
finally:
if locked:
conn.unlock(target='running')
conn.unlock(target=source)
return response

Loading…
Cancel
Save