Enhance comments for migration logic in load function
Added comments to clarify migration handling in load function.
This commit is contained in:
4
utils.py
4
utils.py
@@ -45,6 +45,10 @@ def load_json(path):
|
|||||||
try:
|
try:
|
||||||
with open(path, 'r') as f:
|
with open(path, 'r') as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
|
# Ensure migration happens if loading old file
|
||||||
|
# We don't change structure here, HistoryTree class handles logic
|
||||||
|
|
||||||
return data, get_file_mtime(path)
|
return data, get_file_mtime(path)
|
||||||
except:
|
except:
|
||||||
return DEFAULTS.copy(), 0
|
return DEFAULTS.copy(), 0
|
||||||
|
|||||||
Reference in New Issue
Block a user