Skip to content

Commit

Permalink
Materials: Py2 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Jul 2, 2019
1 parent 4b468eb commit 6a8f6e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Mod/Material/Material.py
Expand Up @@ -20,6 +20,7 @@
# * *
# ***************************************************************************

import sys
import FreeCAD


Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6a8f6e2

Please sign in to comment.