diff options
| author | Simeon Simeonov | 2017-05-13 17:38:39 +0200 |
|---|---|---|
| committer | Simeon Simeonov | 2017-05-13 17:38:39 +0200 |
| commit | 06136d21f73eb26c8fc516b257345a87540ed658 (patch) | |
| tree | 35c73b4ea83df74b4434e468eacaa9662bb7995d | |
| parent | 28592b4cbfda15f8594b2765d031c777d31cf767 (diff) | |
Fix an encoding bug in beinc_weechat.py
| -rw-r--r-- | beinc_weechat.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/beinc_weechat.py b/beinc_weechat.py index 982e8f0..a897a7d 100644 --- a/beinc_weechat.py +++ b/beinc_weechat.py | |||
| @@ -341,10 +341,10 @@ class WeechatTarget(object): | |||
| 341 | ('password', self.__password), | 341 | ('password', self.__password), |
| 342 | ('title', title), | 342 | ('title', title), |
| 343 | ('message', message) | 343 | ('message', message) |
| 344 | )), | 344 | )).encode('utf-8'), |
| 345 | timeout=self.__socket_timeout, | 345 | timeout=self.__socket_timeout, |
| 346 | context=self.__context) | 346 | context=self.__context) |
| 347 | response_dict = json.loads(response.read()) | 347 | response_dict = json.loads(response.read().decode('utf-8')) |
| 348 | if response.code != 200: | 348 | if response.code != 200: |
| 349 | raise socket.error(response_dict.get('message', '')) | 349 | raise socket.error(response_dict.get('message', '')) |
| 350 | if self.__debug: | 350 | if self.__debug: |
