mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 12:40:22 +03:00
session device name
This commit is contained in:
parent
f9643bf737
commit
06a9528dc0
|
@ -27,7 +27,6 @@ if typing.TYPE_CHECKING:
|
||||||
|
|
||||||
_base_log = logging.getLogger(__base_name__)
|
_base_log = logging.getLogger(__base_name__)
|
||||||
|
|
||||||
|
|
||||||
# In seconds, how long to wait before disconnecting a exported sender.
|
# In seconds, how long to wait before disconnecting a exported sender.
|
||||||
_DISCONNECT_EXPORTED_AFTER = 60
|
_DISCONNECT_EXPORTED_AFTER = 60
|
||||||
|
|
||||||
|
@ -358,9 +357,9 @@ class TelegramBaseClient(abc.ABC):
|
||||||
system = platform.uname()
|
system = platform.uname()
|
||||||
|
|
||||||
if system.machine in ('x86_64', 'AMD64'):
|
if system.machine in ('x86_64', 'AMD64'):
|
||||||
default_device_model = 'PC 64bit'
|
default_device_model = 'Telethon 64bit'
|
||||||
elif system.machine in ('i386','i686','x86'):
|
elif system.machine in ('i386', 'i686', 'x86'):
|
||||||
default_device_model = 'PC 32bit'
|
default_device_model = 'Telethon 32bit'
|
||||||
else:
|
else:
|
||||||
default_device_model = system.machine
|
default_device_model = system.machine
|
||||||
default_system_version = re.sub(r'-.+','',system.release)
|
default_system_version = re.sub(r'-.+','',system.release)
|
||||||
|
@ -523,12 +522,12 @@ class TelegramBaseClient(abc.ABC):
|
||||||
print('Failed to connect')
|
print('Failed to connect')
|
||||||
"""
|
"""
|
||||||
if not await self._sender.connect(self._connection(
|
if not await self._sender.connect(self._connection(
|
||||||
self.session.server_address,
|
self.session.server_address,
|
||||||
self.session.port,
|
self.session.port,
|
||||||
self.session.dc_id,
|
self.session.dc_id,
|
||||||
loggers=self._log,
|
loggers=self._log,
|
||||||
proxy=self._proxy,
|
proxy=self._proxy,
|
||||||
local_addr=self._local_addr
|
local_addr=self._local_addr
|
||||||
)):
|
)):
|
||||||
# We don't want to init or modify anything if we were already connected
|
# We don't want to init or modify anything if we were already connected
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user