Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load_file_or_uri(source):
"""wrapper around RDFLoader class"""
_db = RDFLoader()
try:
db = _db.load(source)
add_ns(db)
return db
except:
e = sys.exc_info()[0]
print "--error--->", e
return None
def load(self, uri_or_path=None, text=None, file_obj=None, rdf_format="", verbose=False):
l = RDFLoader()
self.rdfgraph = l.load(uri_or_path, text, file_obj, rdf_format, verbose)
self.queryHelper = QueryHelper(self.rdfgraph)
self.namespaces = sorted(self.rdfgraph.namespaces())