From 52920c3c7143c1fa23f741a910baccda4fd51f42 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Sun, 2 Feb 2020 21:11:05 +0100 Subject: [PATCH] URI decoding: dirty temp fix for bug where default dms makes a mess when should guess file --- python/obitools3/uri/decode.pyx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) mode change 100755 => 100644 python/obitools3/uri/decode.pyx diff --git a/python/obitools3/uri/decode.pyx b/python/obitools3/uri/decode.pyx old mode 100755 new mode 100644 index 5f9288e..4451503 --- a/python/obitools3/uri/decode.pyx +++ b/python/obitools3/uri/decode.pyx @@ -171,7 +171,8 @@ Reads an URI and returns a tuple containing: def open_uri(uri, bint input=True, type newviewtype=View, - dms_only=False): + dms_only=False, + force_file=False): cdef bytes urib = tobytes(uri) cdef bytes scheme @@ -195,9 +196,9 @@ def open_uri(uri, if 'obi' not in config: config['obi']={} - try: + if not force_file and "defaultdms" in config["obi"]: default_dms=config["obi"]["defaultdms"] - except KeyError: + else: default_dms=None try: