File tree Expand file tree Collapse file tree 1 file changed +0
-8
lines changed
Expand file tree Collapse file tree 1 file changed +0
-8
lines changed Original file line number Diff line number Diff line change 88import unicodedata # case insensitive compare in Utility
99from dataclasses import dataclass , field
1010from json import JSONDecodeError
11- # from re import sub
1211from stat import filemode
1312from urllib .parse import urlparse
1413from uuid import UUID # validate UUIDv4 strings
@@ -235,18 +234,11 @@ def is_uuidv4(string: str):
235234 return True
236235
237236
238- # def eprint(*args, **kwargs):
239- # """Adapt legacy function to logging."""
240- # logging.debug(*args, **kwargs)
241-
242-
243237def get_resource_type_by_url (url : str ):
244238 """Get the resource type definition from a resource URL."""
245239 url_parts = urlparse (url )
246240 url_path = url_parts .path
247241 resource_type = re .sub (r'/(core|rest|identity|auth|product-metadata)/v\d+/([^/]+)/?.*' , r'\2' , url_path )
248- # if resource_type == "download-urls.json":
249- # resource_type = "download-urls"
250242 if RESOURCES .get (resource_type ):
251243 return RESOURCES .get (resource_type )
252244 else :
You can’t perform that action at this time.
0 commit comments