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..innerr)rrrrrÚ with_cursor s r)Ú__doc__rÚ ImportErrorÚ pysqlite2rrrrrrÚs  ÿ