aboutsummaryrefslogtreecommitdiffstats
path: root/skype/skyped.py
diff options
context:
space:
mode:
Diffstat (limited to 'skype/skyped.py')
-rw-r--r--skype/skyped.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/skype/skyped.py b/skype/skyped.py
index 4f274be7..d5a1582a 100644
--- a/skype/skyped.py
+++ b/skype/skyped.py
@@ -183,7 +183,10 @@ class SkypeApi:
if not len(msg_text) or msg_text == "PONG":
return
try:
- e = msg_text.decode(locale.getdefaultlocale()[1])
+ encoding = locale.getdefaultlocale()[1]
+ if not encoding:
+ raise ValueError
+ e = msg_text.decode(encoding)
except ValueError:
e = msg_text.decode('UTF-8')
dprint('>> ' + e)