|
|
|
@ -29,11 +29,11 @@ def parse_property_text(text): |
|
|
|
|
|
|
|
|
|
|
|
def read_backup_properties(property_file: Path): |
|
|
|
cached_result = tibi_cache.read(property_file.name) |
|
|
|
if cached_result is None: |
|
|
|
try: |
|
|
|
data = tibi_cache[property_file.name] |
|
|
|
return data |
|
|
|
except KeyError: |
|
|
|
with open(property_file) as backup_properties: |
|
|
|
data = parse_property_text(backup_properties.read()) |
|
|
|
tibi_cache.write(property_file.name, data) |
|
|
|
tibi_cache[property_file.name] = data |
|
|
|
return data |
|
|
|
else: |
|
|
|
return cached_result |