mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-25 21:42:21 +03:00
file transfer fixed
This commit is contained in:
parent
429b51b84e
commit
c753082d77
1 changed files with 7 additions and 2 deletions
|
@ -13,7 +13,9 @@ from base.Scope import Scope
|
|||
class FileTransfer(slixmpp.ClientXMPP):
|
||||
def __init__(self, file_path):
|
||||
|
||||
print('init')
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
scope = Scope().getInstance()
|
||||
|
||||
self.logger = scope.getLogger()
|
||||
|
@ -24,7 +26,10 @@ class FileTransfer(slixmpp.ClientXMPP):
|
|||
self.my_pass = str(self.configuration_manager.get('CONNECTION', 'password'))
|
||||
self.receiver = self.configuration_manager.get('CONNECTION', 'receiverjid') + '@' + self.configuration_manager.get('CONNECTION', 'servicename') + '/Smack'
|
||||
|
||||
slixmpp.ClientXMPP.__init__(self, self.my_jid, self.my_pass)
|
||||
try:
|
||||
slixmpp.ClientXMPP.__init__(self, self.my_jid, self.my_pass)
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
|
||||
self.register_plugin('xep_0030') # Service Discovery
|
||||
self.register_plugin('xep_0065')
|
||||
|
|
Loading…
Reference in a new issue