From 7c02782e3c9742294b63fad1724d2820672eaee1 Mon Sep 17 00:00:00 2001 From: MercierC Date: Mon, 29 Mar 2021 11:18:19 +1300 Subject: [PATCH] import/export: workaround for issue where flake8(?) reads '\t' as '\'+'t' when parsing an option value --- python/obitools3/uri/decode.pyx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/obitools3/uri/decode.pyx b/python/obitools3/uri/decode.pyx index 3cf95c6..c0c38b7 100644 --- a/python/obitools3/uri/decode.pyx +++ b/python/obitools3/uri/decode.pyx @@ -386,10 +386,13 @@ def open_uri(uri, raise MalformedURIException('Malformed header argument in URI') if b"sep" in qualifiers: - sep=tobytes(qualifiers[b"sep"][0][0]) + sep = tobytes(qualifiers[b"sep"][0][0]) else: try: - sep=tobytes(config["obi"]["sep"]) + sep = config["obi"]["sep"] + if sep == '\\t': # dirty workaround for flake8(?) issue that reads '\t' as '\'+'t' when parsing the option value + sep = '\t' + sep = tobytes(sep) except KeyError: sep=None