File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11from typing import Dict , List , Optional , Union
2- from fnmatch import fnmatch
2+ import re
33
44from openeo .internal .jupyter import render_component
55from openeo .rest .models import federation_extension
@@ -38,10 +38,11 @@ def api_version_check(self) -> ComparableVersion:
3838 raise ApiVersionException ("No API version found" )
3939 return ComparableVersion (api_version )
4040
41- def has_conformance (self , conformance : str ) -> bool :
41+ def has_conformance (self , uri : str ) -> bool :
4242 """Check if backend provides a given conformance string"""
43- for url in self .capabilities .get ("conformsTo" , []):
44- if fnmatch (url , conformance ):
43+ uri = re .escape (uri ).replace ('\\ *' , '[^/]+' )
44+ for conformance_uri in self .capabilities .get ("conformsTo" , []):
45+ if re .match (conformance_uri , uri ):
4546 return True
4647 return False
4748
You can’t perform that action at this time.
0 commit comments