File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed
Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -60,23 +60,19 @@ def evalLoad(ctx, u):
6060 raise UnSupportedQuery ("For load queries we need a iriref for a target graph" )
6161
6262 success = False
63- loadedGraph = Graph ()
64- try :
65- loadedGraph .load (u .iri , publicID = u .graphiri )
66- success = True
67- except :
68- pass
69- if not success :
70- try :
71- return loadedGraph .load (u .iri , format = 'n3' )
72- success = True
73- except :
74- pass
75- if not success :
63+ loadedGraph = None
64+ exceptions = []
65+ formats = [None , 'n3' , 'nt' , 'turtle' ]
66+ for format in formats :
67+ loadedGraph = Graph ()
7668 try :
77- return loadedGraph .load (u .iri , format = 'nt' )
69+ if not format :
70+ loadedGraph .load (u .iri )
71+ else :
72+ loadedGraph .load (u .iri , format = format )
7873 success = True
79- except :
74+ break
75+ except Exception as e :
8076 pass
8177 if not success :
8278 raise Exception (
You can’t perform that action at this time.
0 commit comments