URI decoding: fixed bug with dms-only URI
This commit is contained in:
@ -226,34 +226,34 @@ def open_uri(uri,
|
||||
type(dms[1]),
|
||||
urlunparse(urip),
|
||||
len(dms[0]))
|
||||
if dms[1]:
|
||||
try:
|
||||
resource=open_dms_element(dms[0],
|
||||
dms[1],
|
||||
create,
|
||||
newviewtype)
|
||||
#if dms[1]:
|
||||
try:
|
||||
resource=open_dms_element(dms[0],
|
||||
dms[1],
|
||||
create,
|
||||
newviewtype)
|
||||
|
||||
scheme=b"dms"
|
||||
urip = ParseResultBytes(scheme=b"dms",
|
||||
netloc=urip.netloc,
|
||||
path=urip.path,
|
||||
params=urip.params,
|
||||
query=urip.query,
|
||||
fragment=urip.fragment)
|
||||
scheme=b"dms"
|
||||
urip = ParseResultBytes(scheme=b"dms",
|
||||
netloc=urip.netloc,
|
||||
path=urip.path,
|
||||
params=urip.params,
|
||||
query=urip.query,
|
||||
fragment=urip.fragment)
|
||||
|
||||
if default_dms is None:
|
||||
config["obi"]["defaultdms"]=resource[0]
|
||||
if default_dms is None:
|
||||
config["obi"]["defaultdms"]=resource[0]
|
||||
|
||||
return (resource[0],
|
||||
resource[1],
|
||||
type(resource[1]),
|
||||
urlunparse(urip),
|
||||
len(resource[1]))
|
||||
except Exception as e:
|
||||
global obi_errno
|
||||
if obi_errno == OBIVIEW_ALREADY_EXISTS_ERROR:
|
||||
raise Exception("View name already exists in this DMS")
|
||||
error=e
|
||||
return (resource[0],
|
||||
resource[1],
|
||||
type(resource[1]),
|
||||
urlunparse(urip),
|
||||
len(resource[1]))
|
||||
except Exception as e:
|
||||
global obi_errno
|
||||
if obi_errno == OBIVIEW_ALREADY_EXISTS_ERROR:
|
||||
raise Exception("View name already exists in this DMS")
|
||||
error=e
|
||||
|
||||
if scheme==b"dms" :
|
||||
logger('Error','Could not open DMS URI: %s', uri)
|
||||
|
Reference in New Issue
Block a user