[modules/stock] Modify symbol decoding for Python3 compatibility
In Python3, string doesn't have a "decode" method. I will need to find a proper fix for this, but for now, the workaround seems to do the trick.
This commit is contained in:
parent
c73a3cfa34
commit
12a3aa5456
1 changed files with 2 additions and 1 deletions
|
@ -33,7 +33,8 @@ class Module(bumblebee.engine.Module):
|
|||
self._currencies = '$' * len(self._symbols)
|
||||
|
||||
# The currencies could be unicode, like the € symbol. Convert to a unicode object.
|
||||
self._currencies = self._currencies.decode('utf-8', 'ignore')
|
||||
if hasattr(self._currencies, "decode"):
|
||||
self._currencies = self._currencies.decode("utf-8", "ignore")
|
||||
|
||||
def value(self, widget):
|
||||
results = []
|
||||
|
|
Loading…
Reference in a new issue