HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux mail.btech-izolacje.pl 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
User: pewna6876 (1017)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/landscape/lib/__pycache__/store.cpython-310.pyc
o

���c��@s<dZzddlZWneyddlmZYnwdd�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�||g|�Ri|��}W|��n|��w|j��W|Sty@|j�	��w)N)
�_db�sqlite3�connect�	_filename�_ensure_schema�cursor�close�commit�
BaseException�rollback)�self�args�kwargsr�result��method��5/usr/lib/python3/dist-packages/landscape/lib/store.py�inners
�
�zwith_cursor.<locals>.innerr)rrrrr�with_cursor	s
r)�__doc__r�ImportError�	pysqlite2rrrrrr�<module>s�