URI decoding: dirty temp fix for bug where default dms makes a mess when
should guess file
This commit is contained in:
7
python/obitools3/uri/decode.pyx
Executable file → Normal file
7
python/obitools3/uri/decode.pyx
Executable file → Normal file
@ -171,7 +171,8 @@ Reads an URI and returns a tuple containing:
|
|||||||
def open_uri(uri,
|
def open_uri(uri,
|
||||||
bint input=True,
|
bint input=True,
|
||||||
type newviewtype=View,
|
type newviewtype=View,
|
||||||
dms_only=False):
|
dms_only=False,
|
||||||
|
force_file=False):
|
||||||
|
|
||||||
cdef bytes urib = tobytes(uri)
|
cdef bytes urib = tobytes(uri)
|
||||||
cdef bytes scheme
|
cdef bytes scheme
|
||||||
@ -195,9 +196,9 @@ def open_uri(uri,
|
|||||||
if 'obi' not in config:
|
if 'obi' not in config:
|
||||||
config['obi']={}
|
config['obi']={}
|
||||||
|
|
||||||
try:
|
if not force_file and "defaultdms" in config["obi"]:
|
||||||
default_dms=config["obi"]["defaultdms"]
|
default_dms=config["obi"]["defaultdms"]
|
||||||
except KeyError:
|
else:
|
||||||
default_dms=None
|
default_dms=None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user