comparison src/plugins/plugin_xep_0054.py @ 788:d6652683c572

plugin XEP-0054: also work with python2-pillow
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 10 Jan 2014 21:12:06 +0100
parents bfabeedbf32e
children 1fe00f0c9a91
comparison
equal deleted inserted replaced
787:dd656d745d6a 788:d6652683c572
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # -*- coding: utf-8 -*- 2 # -*- coding: utf-8 -*-
3 3
4 # SAT plugin for managing xep-0054 4 # SAT plugin for managing xep-0054
5 # Copyright (C) 2009, 2010, 2011, 2012, 2013 Jérôme Poisson (goffi@goffi.org) 5 # Copyright (C) 2009, 2010, 2011, 2012, 2013 Jérôme Poisson (goffi@goffi.org)
6 # Copyright (C) 2014 Emmanuel Gil Peyrot (linkmauve@linkmauve.fr)
6 7
7 # This program is free software: you can redistribute it and/or modify 8 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Affero General Public License as published by 9 # it under the terms of the GNU Affero General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or 10 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version. 11 # (at your option) any later version.
33 34
34 from base64 import b64decode, b64encode 35 from base64 import b64decode, b64encode
35 from hashlib import sha1 36 from hashlib import sha1
36 from sat.core import exceptions 37 from sat.core import exceptions
37 from sat.memory.persistent import PersistentDict 38 from sat.memory.persistent import PersistentDict
38 import Image 39 from PIL import Image
39 from cStringIO import StringIO 40 from cStringIO import StringIO
40 41
41 try: 42 try:
42 from twisted.words.protocols.xmlstream import XMPPHandler 43 from twisted.words.protocols.xmlstream import XMPPHandler
43 except ImportError: 44 except ImportError: