Skip to content

Commit

Permalink
Material: py2 fix in depreciated mat file parser (back port from 0.19)
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Aug 26, 2019
1 parent 7320c4c commit 1e9f9fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Mod/Material/Material.py
Expand Up @@ -20,6 +20,8 @@
# * *
# ***************************************************************************

import sys

# here the usage description if you use this tool from the command line ("__main__")
CommandlineUsage = """Material - Tool to work with FreeCAD Material definition cards
Expand Down Expand Up @@ -62,7 +64,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 1e9f9fa

Please sign in to comment.