mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 03:22:29 +00:00
Explicitly open files as 'r' instead of leaving it out
This commit is contained in:
@@ -119,7 +119,7 @@ class SQLiteSession(MemorySession):
|
||||
def _check_migrate_json(self):
|
||||
if file_exists(self.filename):
|
||||
try:
|
||||
with open(self.filename, encoding='utf-8') as f:
|
||||
with open(self.filename, 'r', encoding='utf-8') as f:
|
||||
data = json.load(f)
|
||||
self.delete() # Delete JSON file to create database
|
||||
|
||||
|
Reference in New Issue
Block a user