From 6e4f79e47d54f045b20c93bb5d41a66a7ee4534c Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Thu, 15 Feb 2018 07:48:59 +0100 Subject: [PATCH] FEM: elmer sifio, Python3 unicode fix --- src/Mod/Fem/femsolver/elmer/sifio.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Fem/femsolver/elmer/sifio.py b/src/Mod/Fem/femsolver/elmer/sifio.py index 28d615a7b8..aadea573cf 100644 --- a/src/Mod/Fem/femsolver/elmer/sifio.py +++ b/src/Mod/Fem/femsolver/elmer/sifio.py @@ -22,6 +22,7 @@ import collections +import six SIMULATION = "Simulation" @@ -401,7 +402,7 @@ class _Writer(object): def _preprocess(self, data, dataType): if issubclass(dataType, Section): return str(self._idMgr.getId(data)) - if issubclass(dataType, str) or issubclass(dataType, unicode): + if issubclass(dataType, six.string_types): # use six to be sure to be Python 2.7 and 3.x compatible return '"%s"' % data return str(data)