mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Ensure device model is non-empty (closes #154)
This commit is contained in:
parent
9bb6353fa3
commit
632fcb7c00
|
@ -113,9 +113,10 @@ class JsonSession:
|
|||
else: # str / None
|
||||
self.session_user_id = session_user_id
|
||||
|
||||
self.device_model = platform.node()
|
||||
self.system_version = platform.system()
|
||||
self.app_version = '1.0' # note: '0' will provoke error
|
||||
system = platform.uname()
|
||||
self.device_model = system.system if system.system else 'Unknown'
|
||||
self.system_version = system.release if system.release else '1.0'
|
||||
self.app_version = '1.0' # '0' will provoke error
|
||||
self.lang_code = 'en'
|
||||
self.system_lang_code = self.lang_code
|
||||
self.lang_pack = ''
|
||||
|
|
Loading…
Reference in New Issue
Block a user