Materials: Py2 fix

This commit is contained in:
Bernd Hahnebach
2019-07-02 12:31:43 +02:00
committed by GitHub
parent 2f8179719e
commit dd4b93c201

View File

@@ -20,6 +20,7 @@
# * *
# ***************************************************************************
import sys
import FreeCAD
@@ -70,7 +71,10 @@ def importFCMat(fileName):
)
Config = configparser.RawConfigParser()
Config.optionxform = str
Config.read(fileName, encoding='utf-8') # respect unicode filenames
if sys.version_info.major >= 3:
Config.read(fileName, encoding='utf-8') # respect unicode filenames
else:
Config.read(fileName)
dict1 = {}
for section in Config.sections():
options = Config.options(section)