Merge branch 'jingleft' of https://dev.gajim.org/linkmauve/gajim into HEAD

This commit is contained in:
Yann Leboulanger 2017-06-14 22:32:21 +02:00
commit 5606e5b9a2
3 changed files with 4 additions and 4 deletions

View File

@ -176,7 +176,7 @@ class JingleFileTransfer(JingleContent):
except IOError:
# can't open file
return
h = nbxmpp.Hashes()
h = nbxmpp.Hashes2()
hash_ = h.calculateHash(self.file_props.algo, file_)
file_.close()
# DEBUG

View File

@ -446,7 +446,7 @@ class JingleSession:
hash_ = child.getTag('file').getTag(name='hash',
namespace=nbxmpp.NS_HASHES_2)
algo = hash_.getAttr('algo')
if algo in nbxmpp.Hashes.supported:
if algo in nbxmpp.Hashes2.supported:
file_props = FilesProp.getFileProp(self.connection.name,
self.sid)
file_props.algo = algo

View File

@ -73,7 +73,7 @@ from session import ChatControlSession
from common import sleepy
from nbxmpp import idlequeue
from nbxmpp import Hashes
from nbxmpp import Hashes2
from common.zeroconf import connection_zeroconf
from common import resolver
from common import caps_cache
@ -988,7 +988,7 @@ class Interface:
session = gajim.connections[account].get_jingle_session(jid=None,
sid=file_props.sid)
ft_win = self.instances['file_transfers']
h = Hashes()
h = Hashes2()
try:
file_ = open(file_props.file_name, 'rb')
except: