diff --git a/python/obitools3/uri/decode.pyx b/python/obitools3/uri/decode.pyx index c2b756d..7690bb8 100644 --- a/python/obitools3/uri/decode.pyx +++ b/python/obitools3/uri/decode.pyx @@ -276,11 +276,11 @@ def open_uri(uri, iseq = urib objclass = bytes else: # TODO update uopen to be able to write? - if urip.path == b'-': + if not urip.path or urip.path == b'-': file = sys.stdout.buffer - elif urip.path : + else: file = open(urip.path, 'wb') - + if file is not None: qualifiers=parse_qs(urip.query)