Explicitly open files as 'r' instead of leaving it out

This commit is contained in:
Lonami Exo
2018-06-29 11:34:57 +02:00
parent d64eb7ea2b
commit dd0eb7a90e
6 changed files with 12 additions and 11 deletions

View File

@@ -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