This commit is contained in:
bakatrouble 2019-01-28 00:36:52 +03:00
parent cba3643e02
commit 188c8c1b1a

View File

@ -15,10 +15,10 @@ Session.notice_displayed = True
def get_client():
config._reload_maybe()
pyrogram_sesssion = config.pyrogram_session.replace('.session', '')
if not pyrogram_sesssion or not config.pyrogram_app_id or config.pyrogram_app_hash:
pyrogram_session = config.pyrogram_session.replace('.session', '')
if not pyrogram_session or not config.pyrogram_app_id or not config.pyrogram_app_hash:
raise RuntimeError('Pyrogram is not configured')
session_path = os.path.relpath(default_storage.path(pyrogram_sesssion))
session_path = os.path.relpath(default_storage.path(pyrogram_session))
return Client(session_path, config.pyrogram_app_id, config.pyrogram_app_hash)