Fix netconf get_config lock/unlock (#40378)
Lock/unlock the datastore that is given as input for instead of default to `running`
This commit is contained in:
parent
a996d4836a
commit
de2c1dc241
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue