summaryrefslogtreecommitdiff
path: root/reconfigure/configs/base.py
diff options
context:
space:
mode:
authorAndrew Shadura <andrewsh@debian.org>2018-04-25 14:33:27 +0200
committerAndrew Shadura <andrewsh@debian.org>2018-04-25 14:33:27 +0200
commitb50a7a9f6a102709eacd1335c00a1e0d0b259b8e (patch)
tree481b20200ab0c34e1f0d829d8b4b8d17dceaadcd /reconfigure/configs/base.py
parent2989b4c027b3230b1778e3777d2cce53c89808d9 (diff)
New upstream version 0.1.81+git20171214.2b8729a8
Diffstat (limited to 'reconfigure/configs/base.py')
-rw-r--r--reconfigure/configs/base.py5
1 files changed, 2 insertions, 3 deletions
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):