#NEWLINE# def open( self ) : #NEWLINE# #INDENT# import ZODB #NEWLINE# from ZODB.FileStorage import FileStorage #NEWLINE# self . path = self . conf [ 'rdf.store_conf' ] #NEWLINE# openstr = os . path . abspath ( self . path ) #NEWLINE# fs = FileStorage ( openstr ) #NEWLINE# self . zdb = ZODB . DB ( fs ) #NEWLINE# self . conn = self . zdb . open ( ) #NEWLINE# root = self . conn . root ( ) #NEWLINE# if ( 'rdflib' not in root ) : #NEWLINE# #INDENT# root [ 'rdflib' ] = ConjunctiveGraph ( 'ZODB' ) #NEWLINE# #UNINDENT# self . graph = root [ 'rdflib' ] #NEWLINE# try : #NEWLINE# #INDENT# transaction . commit ( ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# L . warning ( 'Forced to abort transaction on ZODB store opening' ) #NEWLINE# traceback . print_exc ( ) #NEWLINE# transaction . abort ( ) #NEWLINE# #UNINDENT# transaction . begin ( ) #NEWLINE# self . graph . open ( self . path )