import/export: workaround for issue where flake8(?) reads '\t' as

'\'+'t' when parsing an option value
This commit is contained in:
MercierC
2021-03-29 11:18:19 +13:00
parent ecc4c2c78b
commit 7c02782e3c

View File

@ -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