Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2013-01-02 20:53:42 +0400
committerYann Leboulanger <asterix@lagaule.org>2013-01-02 20:53:42 +0400
commit2c21353a8b02eb2249c7417881f1a90d0510b368 (patch)
treed81ec00ba152217bec838c4546ebf4dd112e0656 /src/profile_window.py
parent912f0e921d52f2296932c6779ad35f3bd0d144d0 (diff)
remove has_key()
fix base64 calls (requires and returns bytes, not str)
Diffstat (limited to 'src/profile_window.py')
-rw-r--r--src/profile_window.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/profile_window.py b/src/profile_window.py
index 614af3add..696c66beb 100644
--- a/src/profile_window.py
+++ b/src/profile_window.py
@@ -171,7 +171,8 @@ class ProfileWindow:
button.show()
text_button = self.xml.get_object('NOPHOTO_button')
text_button.hide()
- self.avatar_encoded = base64.encodestring(data)
+ self.avatar_encoded = base64.b64encode(data.encode('utf-8')).decode(
+ 'utf-8')
# returns None if unknown type
self.avatar_mime_type = mimetypes.guess_type(path_to_file)[0]
if must_delete: