mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Don't crash if propsfile doesn't exist
This commit is contained in:
parent
e586569b31
commit
a1cdcf2fba
1 changed files with 1 additions and 1 deletions
|
@ -349,7 +349,7 @@ class Collection:
|
||||||
with open(props_path, encoding=STORAGE_ENCODING) as prop_file:
|
with open(props_path, encoding=STORAGE_ENCODING) as prop_file:
|
||||||
properties.update(json.load(prop_file))
|
properties.update(json.load(prop_file))
|
||||||
properties[key] = value
|
properties[key] = value
|
||||||
with open(props_path, "w", encoding=STORAGE_ENCODING) as prop_file:
|
with open(props_path, "w+", encoding=STORAGE_ENCODING) as prop_file:
|
||||||
json.dump(properties, prop_file)
|
json.dump(properties, prop_file)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue