MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _get_auth_conn

Method _get_auth_conn

auth_manager.py:113–126  ·  view source on GitHub ↗

Context manager for auth database connections.

(self)

Source from the content-addressed store, hash-verified

111
112 @contextmanager
113 def _get_auth_conn(self):
114 """Context manager for auth database connections."""
115 conn = None
116 try:
117 conn = sqlite3.connect(self.auth_db_path, check_same_thread=False)
118 conn.row_factory = sqlite3.Row
119 yield conn
120 except Exception:
121 if conn:
122 conn.rollback()
123 raise
124 finally:
125 if conn:
126 conn.close()
127
128 # =========================================================================
129 # HARDWARE FINGERPRINT

Callers 9

_init_auth_dbMethod · 0.95
is_configuredMethod · 0.95
get_auth_statusMethod · 0.95
setupMethod · 0.95
loginMethod · 0.95
change_passwordMethod · 0.95
recoverMethod · 0.95

Calls 3

rollbackMethod · 0.80
connectMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected