From b50a7a9f6a102709eacd1335c00a1e0d0b259b8e Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Wed, 25 Apr 2018 14:33:27 +0200 Subject: New upstream version 0.1.81+git20171214.2b8729a8 --- reconfigure/configs/base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'reconfigure/configs') diff --git a/reconfigure/configs/base.py b/reconfigure/configs/base.py index fc2ce6f..0d707fb 100644 --- a/reconfigure/configs/base.py +++ b/reconfigure/configs/base.py @@ -1,5 +1,4 @@ import chardet -import six import sys @@ -38,8 +37,8 @@ class Reconfig (object): self.content = open(self.origin, 'r').read() self.encoding = 'utf8' - if (six.PY3 and isinstance(self.content, bytes)) or \ - (six.PY2 and isinstance(self.content, str)): + if (sys.version_info[0] >= 3 and isinstance(self.content, bytes)) or \ + (sys.version_info[0] == 2 and isinstance(self.content, str)): try: self.content = self.content.decode('utf8') except (UnicodeDecodeError, AttributeError): -- cgit v1.2.3