From d667370e714e011e9a35170e2e95b48666ba470a Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Thu, 31 Mar 2022 14:14:58 +0200
Subject: [PATCH] MAINT: Re-enabled warnings, which were removed in commit
 484ebadf.

---
 src/caosdb/configuration.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/caosdb/configuration.py b/src/caosdb/configuration.py
index 51e3749a..314a1a1d 100644
--- a/src/caosdb/configuration.py
+++ b/src/caosdb/configuration.py
@@ -84,16 +84,14 @@ def config_to_yaml(config):
 
 
 def validate_yaml_schema(valobj):
-    # TODO: Re-enable warning once the schema has been extended to also cover
-    # SSS pycaosdb.inis and integration tests.
     if optional_jsonschema_validate:
         with open(os.path.join(os.path.dirname(__file__), "schema-pycaosdb-ini.yml")) as f:
             schema = yaml.load(f, Loader=yaml.SafeLoader)
         optional_jsonschema_validate(instance=valobj, schema=schema["schema-pycaosdb-ini"])
-    # else:
-    #     warnings.warn("""
-    #                     Warning: The validation could not be performed because `jsonschema` is not installed.
-    #                 """)
+    else:
+        warnings.warn("""
+                        Warning: The validation could not be performed because `jsonschema` is not installed.
+                    """)
 
 
 def _read_config_files():
-- 
GitLab