hotfix
This commit is contained in:
parent
1bb145728f
commit
42703c9bc2
@ -2,6 +2,7 @@
|
|||||||
# TODO: add support of avatars
|
# TODO: add support of avatars
|
||||||
from toxcore_enums_and_consts import TOX_FILE_KIND
|
from toxcore_enums_and_consts import TOX_FILE_KIND
|
||||||
from os.path import basename, getsize
|
from os.path import basename, getsize
|
||||||
|
from time import time
|
||||||
|
|
||||||
|
|
||||||
TOX_FILE_TRANSFER_STATE = {
|
TOX_FILE_TRANSFER_STATE = {
|
||||||
@ -19,6 +20,7 @@ class FileTransfer(object):
|
|||||||
self._friend_number = friend_number
|
self._friend_number = friend_number
|
||||||
self.state = TOX_FILE_TRANSFER_STATE['RUNNING']
|
self.state = TOX_FILE_TRANSFER_STATE['RUNNING']
|
||||||
self._file_number = file_number
|
self._file_number = file_number
|
||||||
|
self._creation_time = time()
|
||||||
|
|
||||||
def set_tox(self, tox):
|
def set_tox(self, tox):
|
||||||
self._tox = tox
|
self._tox = tox
|
||||||
|
@ -36,7 +36,7 @@ class LibToxCore(object):
|
|||||||
|
|
||||||
|
|
||||||
def string_to_bin(tox_id):
|
def string_to_bin(tox_id):
|
||||||
return c_char_p(tox_id.decode('hex'))
|
return c_char_p(tox_id.decode('hex')) if tox_id is not None else None
|
||||||
|
|
||||||
|
|
||||||
def bin_to_string(raw_id, length):
|
def bin_to_string(raw_id, length):
|
||||||
|
Loading…
Reference in New Issue
Block a user