Changeset 70 in tracdarcs for tracdarcs/repository.py
- Timestamp:
- 12/08/07 12:08:10 (5 years ago)
- Hash name:
- 20071208110810-7a6fb-608bfccc78b5fffe31be99be386319608a7fa0a5
- File:
-
- 1 edited
-
tracdarcs/repository.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tracdarcs/repository.py
r69 r70 293 293 # save the file content in the cache 294 294 295 # UGLY HACK: the following line is required otherwise296 # db.commit() (pysqlite-2.3.2,winxp) throws297 # OperationalError: 'SQL logic error or missing database'298 #self.__db.cnx.cnx.isolation_level = None299 # END UGLY HACK300 301 295 c = self.__db.cursor() 302 296 c.execute( 'INSERT INTO darcs_cache(node_id,rev,content) ' 303 297 'VALUES (%s,%s,%s)', 304 298 (self.__node_id,self.rev,buffer(data)) ) 305 self.__db.commit() 299 try: 300 self.__db.commit() 301 except Exception, e: 302 # Sometimes db.commit() (sqllite) throws an 303 # OperationalError: 'SQL logic error or missing database' 304 # Since this is just a cache, we simply notify and keep 305 # going. 306 self.__log.warning("Error writing cache: %s", e) 306 307 return StringIO.StringIO( data ) 307 308
Note: See TracChangeset
for help on using the changeset viewer.