diff --git a/python/obitools3/uri/decode.pyx b/python/obitools3/uri/decode.pyx old mode 100644 new mode 100755 index 0e5df55..74d44d7 --- a/python/obitools3/uri/decode.pyx +++ b/python/obitools3/uri/decode.pyx @@ -162,7 +162,8 @@ Reads an URI and returns a tuple containing: ''' def open_uri(uri, bint input=True, - type newviewtype=View): + type newviewtype=View, + dms_only=False): cdef bytes urib = tobytes(uri) cdef bytes scheme @@ -200,6 +201,11 @@ def open_uri(uri, dms=(default_dms, urip.path) if dms is not None: + if dms_only: + return (dms[0], + dms[1], + type(dms[1]), + urlunparse(urip)) try: resource=open_dms_element(dms[0], dms[1], @@ -229,7 +235,7 @@ def open_uri(uri, if scheme==b"dms" : logger('Error','Could not open DMS URI: %s', uri) - raise FileNotFoundError('uri') + raise FileNotFoundError() if not urip.scheme: urib=b"file:"+urib