Material: py2 fix in depreciated mat file parser (back port from 0.19)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user