From a5ee1b68ba3993ac84b33862b823affa9bbab3a4 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Fri, 18 Jan 2013 21:59:08 -0500 Subject: [PATCH] Allow unicode to be returned from a genPOI filter function --- overviewer_core/aux_files/genPOI.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/overviewer_core/aux_files/genPOI.py b/overviewer_core/aux_files/genPOI.py index 62750cb..45b786f 100755 --- a/overviewer_core/aux_files/genPOI.py +++ b/overviewer_core/aux_files/genPOI.py @@ -201,7 +201,7 @@ def main(): for poi in rset._pois['Entities']: result = filter_function(poi) if result: - if type(result) == str: + if isinstance(result, basestring): d = dict(x=poi['Pos'][0], y=poi['Pos'][1], z=poi['Pos'][2], text=result, hovertext=result) elif type(result) == tuple: d = dict(x=poi['Pos'][0], y=poi['Pos'][1], z=poi['Pos'][2], text=result[1], hovertext=result[0]) @@ -213,7 +213,7 @@ def main(): for poi in rset._pois['TileEntities']: result = filter_function(poi) if result: - if type(result) == str: + if isinstance(result, basestring): d = dict(x=poi['x'], y=poi['y'], z=poi['z'], text=result, hovertext=result) elif type(result) == tuple: d = dict(x=poi['x'], y=poi['y'], z=poi['z'], text=result[1], hovertext=result[0]) @@ -225,7 +225,7 @@ def main(): for poi in rset._pois['Players']: result = filter_function(poi) if result: - if type(result) == str: + if isinstance(result, basestring): d = dict(x=poi['x'], y=poi['y'], z=poi['z'], text=result, hovertext=result) elif type(result) == tuple: d = dict(x=poi['x'], y=poi['y'], z=poi['z'], text=result[1], hovertext=result[0]) @@ -237,7 +237,7 @@ def main(): for poi in rset._pois['Manual']: result = filter_function(poi) if result: - if type(result) == str: + if isinstance(result, basestring): d = dict(x=poi['x'], y=poi['y'], z=poi['z'], text=result, hovertext=result) elif type(result) == tuple: d = dict(x=poi['x'], y=poi['y'], z=poi['z'], text=result[1], hovertext=result[0])