Skip to content

Commit

Permalink
format expects string and encode not needed
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#2681
  • Loading branch information
dietmarw authored and OpenModelica-Hudson committed Oct 1, 2018
1 parent b102b48 commit 5bf01fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Examples/generate_icons.py
Expand Up @@ -254,7 +254,7 @@ def getGraphicsForClass(modelicaClass):
graphicsObj['fillPattern'] = g[11]
graphicsObj['lineThickness'] = float(g[12])
graphicsObj['extent'] = [[float(g[13]), float(g[14])], [float(g[15]), float(g[16])]]
graphicsObj['textString'] = g[17].strip('"').encode('utf-8')
graphicsObj['textString'] = g[17].strip('"')
graphicsObj['fontSize'] = float(g[18])
graphicsObj['fontName'] = g[19]
if graphicsObj['fontName']:
Expand Down Expand Up @@ -335,7 +335,7 @@ def getGraphicsWithPortsForClass(modelicaClass):
try:
comp_annotation = ask_omc('getNthComponentAnnotation', modelicaClass + ', ' + str(comp_id))['SET2']['Set1']
except KeyError as ex:
logger.error('KeyError: {0} componentName: {1} {2}'.format(modelicaClass, component_name, ex.message))
logger.error('KeyError: {0} componentName: {1} {2}'.format(modelicaClass, component_name, str(ex)))
continue

# base class graphics for ports
Expand Down

0 comments on commit 5bf01fd

Please sign in to comment.