fixes
This commit is contained in:
@ -32,15 +32,15 @@ def LOG_debug(a): print('DBUG_ '+a)
|
||||
def LOG_trace(a): pass # print('TRAC_ '+a)
|
||||
|
||||
from middleware.tox_factory import tox_factory
|
||||
import wrapper
|
||||
import wrapper.toxcore_enums_and_consts as enums
|
||||
from wrapper.toxcore_enums_and_consts import TOX_CONNECTION, TOX_USER_STATUS, \
|
||||
import tox_wrapper
|
||||
import tox_wrapper.toxcore_enums_and_consts as enums
|
||||
from tox_wrapper.toxcore_enums_and_consts import TOX_CONNECTION, TOX_USER_STATUS, \
|
||||
TOX_MESSAGE_TYPE, TOX_PUBLIC_KEY_SIZE, TOX_FILE_CONTROL
|
||||
import user_data
|
||||
from wrapper.libtox import LibToxCore
|
||||
import wrapper_tests.support_testing as ts
|
||||
from wrapper_tests.support_testing import oMainArgparser
|
||||
from wrapper_tests.support_testing import logging_toxygen_echo
|
||||
from tox_wrapper.libtox import LibToxCore
|
||||
import tox_wrapper.tests.support_testing as ts
|
||||
from tox_wrapper.tests.support_testing import oMainArgparser
|
||||
from tox_wrapper.tests.support_testing import logging_toxygen_echo
|
||||
|
||||
def sleep(fSec):
|
||||
if 'QtCore' in globals():
|
||||
@ -57,7 +57,7 @@ except ImportError as e:
|
||||
# logging.log(logging.DEBUG, f"coloredlogs not available: {e}")
|
||||
coloredlogs = None
|
||||
|
||||
import wrapper_tests.support_testing as ts
|
||||
import tox_wrapper.tests.support_testing as ts
|
||||
if 'USER' in os.environ:
|
||||
sDATA_FILE = '/tmp/logging_toxygen_' +os.environ['USER'] +'.tox'
|
||||
elif 'USERNAME' in os.environ:
|
||||
@ -71,7 +71,7 @@ iDHT_TRY = 0
|
||||
|
||||
#?SERVER = lLOCAL[-1]
|
||||
|
||||
class AV(wrapper.tox.ToxAV):
|
||||
class AV(tox_wrapper.tox.ToxAV):
|
||||
def __init__(self, core):
|
||||
super(AV, self).__init__(core)
|
||||
self.core = self.get_tox()
|
||||
@ -149,7 +149,7 @@ class EchoBot():
|
||||
message_data_size,
|
||||
*largs):
|
||||
key = ''.join(chr(x) for x in public_key[:TOX_PUBLIC_KEY_SIZE])
|
||||
sPk = wrapper.tox.bin_to_string(key, TOX_PUBLIC_KEY_SIZE)
|
||||
sPk = tox_wrapper.tox.bin_to_string(key, TOX_PUBLIC_KEY_SIZE)
|
||||
sMd = str(message_data, 'UTF-8')
|
||||
LOG.debug('on_friend_request ' +sPk +' ' +sMd)
|
||||
self.on_friend_request(sPk, sMd)
|
||||
@ -339,7 +339,7 @@ def iMain(oArgs):
|
||||
oTox = tox_factory(data=opts.savedata_data,
|
||||
settings=opts, args=oArgs, app=None)
|
||||
else:
|
||||
oTox = wrapper.tox.Tox(opts)
|
||||
oTox = tox_wrapper.tox.Tox(opts)
|
||||
t = EchoBot(oTox)
|
||||
t._oargs = oArgs
|
||||
t.start()
|
||||
@ -358,7 +358,7 @@ def iMain(oArgs):
|
||||
return iRet
|
||||
|
||||
def oToxygenToxOptions(oArgs, data=None):
|
||||
tox_options = wrapper.tox.Tox.options_new()
|
||||
tox_options = tox_wrapper.tox.Tox.options_new()
|
||||
|
||||
tox_options.contents.local_discovery_enabled = False
|
||||
tox_options.contents.dht_announcements_enabled = False
|
||||
|
@ -36,11 +36,11 @@ try:
|
||||
except ImportError as e:
|
||||
nmap = False
|
||||
|
||||
import wrapper
|
||||
from wrapper.toxcore_enums_and_consts import TOX_CONNECTION, TOX_USER_STATUS
|
||||
import tox_wrapper
|
||||
from tox_wrapper.toxcore_enums_and_consts import TOX_CONNECTION, TOX_USER_STATUS
|
||||
|
||||
from wrapper_tests.support_http import bAreWeConnected
|
||||
from wrapper_tests.support_onions import (is_valid_fingerprint,
|
||||
from tox_wrapper.tests.support_http import bAreWeConnected
|
||||
from tox_wrapper.tests.support_onions import (is_valid_fingerprint,
|
||||
lIntroductionPoints,
|
||||
oGetStemController,
|
||||
sMapaddressResolv, sTorResolve)
|
||||
@ -245,7 +245,7 @@ def tox_log_cb(level, filename, line, func, message, *args):
|
||||
|
||||
def vAddLoggerCallback(tox_options, callback=None):
|
||||
if callback is None:
|
||||
wrapper.tox.Tox.libtoxcore.tox_options_set_log_callback(
|
||||
tox_wrapper.tox.Tox.libtoxcore.tox_options_set_log_callback(
|
||||
tox_options._options_pointer,
|
||||
POINTER(None)())
|
||||
tox_options.self_logger_cb = None
|
||||
@ -253,7 +253,7 @@ def vAddLoggerCallback(tox_options, callback=None):
|
||||
|
||||
c_callback = CFUNCTYPE(None, c_void_p, c_int, c_char_p, c_int, c_char_p, c_char_p, c_void_p)
|
||||
tox_options.self_logger_cb = c_callback(callback)
|
||||
wrapper.tox.Tox.libtoxcore.tox_options_set_log_callback(
|
||||
tox_wrapper.tox.Tox.libtoxcore.tox_options_set_log_callback(
|
||||
tox_options._options_pointer,
|
||||
tox_options.self_logger_cb)
|
||||
|
||||
|
@ -854,14 +854,14 @@ id(42)
|
||||
cmd = textwrap.dedent('''
|
||||
class MyList(list):
|
||||
def __init__(self):
|
||||
super().__init__() # wrapper_call()
|
||||
super().__init__() # tox_wrapper_call()
|
||||
|
||||
id("first break point")
|
||||
l = MyList()
|
||||
''')
|
||||
# Verify with "py-bt":
|
||||
gdb_output = self.get_stack_trace(cmd,
|
||||
cmds_after_breakpoint=['break wrapper_call', 'continue', 'py-bt'])
|
||||
cmds_after_breakpoint=['break tox_wrapper_call', 'continue', 'py-bt'])
|
||||
self.assertRegex(gdb_output,
|
||||
r"<method-wrapper u?'__init__' of MyList object at ")
|
||||
|
||||
|
@ -67,10 +67,10 @@ except ImportError as e:
|
||||
logging.log(logging.DEBUG, f"color_runner not available: {e}")
|
||||
color_runner = None
|
||||
|
||||
import wrapper
|
||||
import wrapper.toxcore_enums_and_consts as enums
|
||||
from wrapper.tox import Tox
|
||||
from wrapper.toxcore_enums_and_consts import (TOX_ADDRESS_SIZE, TOX_CONNECTION,
|
||||
import tox_wrapper
|
||||
import tox_wrapper.toxcore_enums_and_consts as enums
|
||||
from tox_wrapper.tox import Tox
|
||||
from tox_wrapper.toxcore_enums_and_consts import (TOX_ADDRESS_SIZE, TOX_CONNECTION,
|
||||
TOX_FILE_CONTROL,
|
||||
TOX_MESSAGE_TYPE,
|
||||
TOX_SECRET_KEY_SIZE,
|
||||
@ -79,7 +79,7 @@ from wrapper.toxcore_enums_and_consts import (TOX_ADDRESS_SIZE, TOX_CONNECTION,
|
||||
try:
|
||||
import support_testing as ts
|
||||
except ImportError:
|
||||
import wrapper_tests.support_testing as ts
|
||||
import tox_wrapper.tests.support_testing as ts
|
||||
|
||||
try:
|
||||
from tests.toxygen_tests import test_sound_notification
|
||||
@ -1788,7 +1788,7 @@ def iMain(oArgs):
|
||||
|
||||
def oToxygenToxOptions(oArgs):
|
||||
data = None
|
||||
tox_options = wrapper.tox.Tox.options_new()
|
||||
tox_options = tox_wrapper.tox.Tox.options_new()
|
||||
if oArgs.proxy_type:
|
||||
tox_options.contents.proxy_type = int(oArgs.proxy_type)
|
||||
tox_options.contents.proxy_host = bytes(oArgs.proxy_host, 'UTF-8')
|
||||
|
@ -67,10 +67,10 @@ except ImportError as e:
|
||||
logging.log(logging.DEBUG, f"color_runner not available: {e}")
|
||||
color_runner = None
|
||||
|
||||
import wrapper
|
||||
import wrapper.toxcore_enums_and_consts as enums
|
||||
from wrapper.tox import Tox
|
||||
from wrapper.toxcore_enums_and_consts import (TOX_ADDRESS_SIZE, TOX_CONNECTION,
|
||||
import tox_wrapper
|
||||
import tox_wrapper.toxcore_enums_and_consts as enums
|
||||
from tox_wrapper.tox import Tox
|
||||
from tox_wrapper.toxcore_enums_and_consts import (TOX_ADDRESS_SIZE, TOX_CONNECTION,
|
||||
TOX_FILE_CONTROL,
|
||||
TOX_MESSAGE_TYPE,
|
||||
TOX_SECRET_KEY_SIZE,
|
||||
@ -79,7 +79,7 @@ from wrapper.toxcore_enums_and_consts import (TOX_ADDRESS_SIZE, TOX_CONNECTION,
|
||||
try:
|
||||
import support_testing as ts
|
||||
except ImportError:
|
||||
import wrapper_tests.support_testing as ts
|
||||
import tox_wrapper.tests.support_testing as ts
|
||||
|
||||
try:
|
||||
from tests.toxygen_tests import test_sound_notification
|
||||
@ -1788,7 +1788,7 @@ def iMain(oArgs):
|
||||
|
||||
def oToxygenToxOptions(oArgs):
|
||||
data = None
|
||||
tox_options = wrapper.tox.Tox.options_new()
|
||||
tox_options = tox_wrapper.tox.Tox.options_new()
|
||||
if oArgs.proxy_type:
|
||||
tox_options.contents.proxy_type = int(oArgs.proxy_type)
|
||||
tox_options.contents.proxy_host = bytes(oArgs.proxy_host, 'UTF-8')
|
||||
|
Reference in New Issue
Block a user