Fixed a bug with taxonomy URIs not being read correctly
This commit is contained in:
@ -67,10 +67,10 @@ def open_dms_element(DMS dms, bytes path,
|
|||||||
if path_parts[0]==b"taxonomy":
|
if path_parts[0]==b"taxonomy":
|
||||||
if len(path_parts) > 1:
|
if len(path_parts) > 1:
|
||||||
taxo = Taxonomy.open(dms,path_parts[1])
|
taxo = Taxonomy.open(dms,path_parts[1])
|
||||||
if len(path_parts) == 2:
|
if len(path_parts) == 3:
|
||||||
taxon=taxo[int(path_parts[2])]
|
taxon=taxo[int(path_parts[2])]
|
||||||
return (dms,taxon)
|
return (dms,taxon)
|
||||||
elif len(path_parts) > 2:
|
elif len(path_parts) > 3:
|
||||||
raise MalformedURIException('Malformed Taxonomy URI')
|
raise MalformedURIException('Malformed Taxonomy URI')
|
||||||
return (dms,taxo)
|
return (dms,taxo)
|
||||||
|
|
||||||
@ -166,8 +166,7 @@ def open_uri(uri,
|
|||||||
if scheme==b"" or scheme==b"dms" :
|
if scheme==b"" or scheme==b"dms" :
|
||||||
dms = open_dms(urip.path,create)
|
dms = open_dms(urip.path,create)
|
||||||
if dms is None and default_dms is not None:
|
if dms is None and default_dms is not None:
|
||||||
dms=(default_dms,urip.path)
|
dms=(default_dms, urip.path)
|
||||||
|
|
||||||
|
|
||||||
if dms is not None:
|
if dms is not None:
|
||||||
try:
|
try:
|
||||||
@ -175,6 +174,7 @@ def open_uri(uri,
|
|||||||
create,
|
create,
|
||||||
newviewtype
|
newviewtype
|
||||||
)
|
)
|
||||||
|
|
||||||
scheme=b"dms"
|
scheme=b"dms"
|
||||||
urip = ParseResultBytes(scheme=b"dms",
|
urip = ParseResultBytes(scheme=b"dms",
|
||||||
netloc=urip.netloc,
|
netloc=urip.netloc,
|
||||||
|
Reference in New Issue
Block a user