CiscoUcs / ucsmsdk

Python SDK for Cisco UCSM
Other
80 stars 60 forks source link

Moved lock acquiring code inside try-catch #221

Closed Shashank-Pandey-ML closed 2 years ago

Shashank-Pandey-ML commented 2 years ago

Move the code from acquiring the lock to releasing the lock inside try-catch. Mainly done to make sure that the locks are released in case of errors after acquiring the lock. This also helps when the SDK is used with multithreading.