瀏覽代碼

Fail when test file can't be read

Unrud 4 年之前
父節點
當前提交
34bec01c9b
共有 1 個文件被更改,包括 2 次插入5 次删除
  1. 2 5
      radicale/tests/helpers.py

+ 2 - 5
radicale/tests/helpers.py

@@ -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):