mirror of
https://github.com/Kozea/Radicale.git
synced 2025-07-02 16:58:30 +00:00
Fail when test file can't be read
This commit is contained in:
parent
3d8e3bc46a
commit
94a1181dc6
1 changed files with 2 additions and 5 deletions
|
@ -34,11 +34,8 @@ def get_file_path(file_name):
|
|||
|
||||
|
||||
def get_file_content(file_name):
|
||||
try:
|
||||
with open(get_file_path(file_name), encoding="utf-8") as fd:
|
||||
return fd.read()
|
||||
except IOError:
|
||||
print("Couldn't open the file %s" % file_name)
|
||||
with open(get_file_path(file_name), encoding="utf-8") as fd:
|
||||
return fd.read()
|
||||
|
||||
|
||||
def configuration_to_dict(configuration):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue