Bitbot Python3.11 Inital Commit
This commit is contained in:
parent
b9ffe7b027
commit
3bf47d9ded
3 changed files with 5 additions and 5 deletions
|
@ -15,8 +15,8 @@ class Module(ModuleManager.BaseModule):
|
|||
today = datetime.datetime.utcnow().date()
|
||||
week = datetime.timedelta(days=7)
|
||||
|
||||
not_valid_until = (today-certificate.not_valid_before.date()).days
|
||||
not_valid_after = (certificate.not_valid_after.date()-today).days
|
||||
not_valid_until = (today-certificate.not_valid_before_utc.date()).days
|
||||
not_valid_after = (certificate.not_valid_after_utc.date()-today).days
|
||||
|
||||
if not_valid_until < 0:
|
||||
self.log.warn(
|
||||
|
|
|
@ -235,7 +235,7 @@ class ModuleManager(object):
|
|||
definition.filename)
|
||||
module = importlib.util.module_from_spec(import_spec)
|
||||
sys.modules[import_name] = module
|
||||
loader = typing.cast(importlib.abc.Loader, import_spec.loader)
|
||||
loader = typing.cast(importlib._abc.Loader, import_spec.loader)
|
||||
loader.exec_module(module)
|
||||
|
||||
module_object_pointer = getattr(module, "Module", None)
|
||||
|
|
|
@ -304,8 +304,8 @@ def request_many(requests: typing.List[Request]) -> typing.Dict[str, Response]:
|
|||
loop = asyncio.new_event_loop()
|
||||
awaits = []
|
||||
for request in requests:
|
||||
awaits.append(_request(request))
|
||||
task = asyncio.wait(awaits, loop=loop, timeout=5)
|
||||
awaits.append(loop.create_task(_request(request)))
|
||||
task = asyncio.wait(awaits, timeout=5)
|
||||
loop.run_until_complete(task)
|
||||
loop.close()
|
||||
|
||||
|
|
Loading…
Reference in a new issue