Replaced unicode() with six.text_type() for Python 3 compatibility.

This commit is contained in:
topic2k
2015-03-30 19:50:04 +02:00
parent f93d7dd227
commit f6d7625cd2

View File

@@ -28,6 +28,7 @@
This module contains the definitions of `PersistentObject` and `PersistenceManager` objects.
"""
import six
import wx
import os
import warnings
@@ -783,10 +784,10 @@ class PersistenceManager(object):
kind = repr(value.__class__).split("'")[1]
if self._customConfigHandler is not None:
result = self._customConfigHandler.SaveValue(self.GetKey(obj, keyName), repr((kind, unicode(value))))
result = self._customConfigHandler.SaveValue(self.GetKey(obj, keyName), repr((kind, six.text_type(value))))
else:
config = self.GetPersistenceFile()
result = config.Write(self.GetKey(obj, keyName), repr((kind, unicode(value))))
result = config.Write(self.GetKey(obj, keyName), repr((kind, six.text_type(value))))
config.Flush()
return result