From d077c2bd4a7918a3873f49959250ee048409b2ea Mon Sep 17 00:00:00 2001 From: Alcides Fonseca Date: Thu, 3 May 2018 15:44:50 +0100 Subject: [PATCH] VCFReader uses encoding even if uncompressed --- vcf/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcf/parser.py b/vcf/parser.py index c3c3d08..e9de708 100644 --- a/vcf/parser.py +++ b/vcf/parser.py @@ -266,8 +266,8 @@ def __init__(self, fsock=None, filename=None, compressed=None, prepend_chr=False self.filename = filename if compressed: self._reader = gzip.GzipFile(fileobj=self._reader) - if sys.version > '3': - self._reader = codecs.getreader(encoding)(self._reader) + if sys.version > '3': + self._reader = codecs.getreader(encoding)(self._reader) if strict_whitespace: self._separator = '\t'