HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/landscape/lib/__pycache__/store.cpython-38.pyc
U

���c��@s>dZzddlZWn ek
r0ddlmZYnXdd�ZdS)z+Functions used by all sqlite-backed stores.�N)�dbapi2cs�fdd�}|S)a�Decorator that encloses the method in a database transaction.

    Even though SQLite is supposed to be useful in autocommit mode, we've
    found cases where the database continued to be locked for writing
    until the cursor was closed.  With this in mind, instead of using
    the autocommit mode, we explicitly terminate transactions and enforce
    cursor closing with this decorator.
    cs||jst�|j�|_|��z:|j��}z�||f|�|�}W5|��X|j��Wn tk
rv|j�	��YnX|S)N)
Z_db�sqlite3ZconnectZ	_filenameZ_ensure_schema�cursor�closeZcommit�
BaseExceptionZrollback)�self�args�kwargsr�result��method��5/usr/lib/python3/dist-packages/landscape/lib/store.py�inners


zwith_cursor.<locals>.innerr
)rrr
rr�with_cursor	s
r)�__doc__r�ImportErrorZ	pysqlite2rrr
r
r
r�<module>s