1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

refactoring

This commit is contained in:
Shlomi Fish 2018-02-20 01:52:24 +02:00
parent 3ada0e3e0b
commit 9ad8650dd3

View file

@ -1393,10 +1393,7 @@ class ConfigObj(Section):
"""Decode ASCII strings to unicode if a self.encoding is specified."""
if sys.version_info > (3,):
return str(aString)
if self.encoding:
return aString.decode('ascii')
else:
return aString
return aString.decode('ascii') if self.encoding else aString
def _decode(self, infile, encoding):
"""