mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Test internal server
This commit is contained in:
parent
49d35cf618
commit
5a433f5476
6 changed files with 176 additions and 34 deletions
|
@ -29,10 +29,13 @@ import os
|
|||
EXAMPLES_FOLDER = os.path.join(os.path.dirname(__file__), "static")
|
||||
|
||||
|
||||
def get_file_path(file_name):
|
||||
return os.path.join(EXAMPLES_FOLDER, file_name)
|
||||
|
||||
|
||||
def get_file_content(file_name):
|
||||
try:
|
||||
with open(os.path.join(EXAMPLES_FOLDER, file_name),
|
||||
encoding="utf-8") as fd:
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue