So i wanna know what is more efficient closing connection in Finally clause or having an explicit try catch statement inside a finally is a better approach.
try: #some try logic
except:
print("something")
finally:
try:
my_db_session.close()
except:
pass
or this 1
try: #some try logic
except:
print(traceback.print_exc())
finally:
my_db_session.close()