From 1dcdf69f1fc2e6c9f004fea5ab9d9942b2a1246d Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Tue, 28 Jul 2020 09:31:05 +0200 Subject: [PATCH] export: fixed a bug introduced in version 3.0.0b28 --- python/obitools3/uri/decode.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)