Revert "Revert "Fix for damaged URL definitions""

This reverts commit 608787e455.
This commit is contained in:
Hydrus Network Developer 2024-03-27 17:23:05 -05:00
parent 3c9793e788
commit ffd2ba42b8
No known key found for this signature in database
GPG Key ID: 76249F053212133C
1 changed files with 9 additions and 1 deletions

View File

@ -1049,7 +1049,15 @@ class URLClass( HydrusSerialisable.SerialisableBaseNamed ):
num_total_path_components = len( self._path_components )
num_required_parameters = len( [ 1 for parameter in self._parameters if parameter.GetDefaultValue() is None ] )
num_total_parameters = len( self._parameters )
len_example_url = len( self.Normalise( self._example_url, ephemeral_ok = True ) )
try:
len_example_url = len( self.Normalise( self._example_url, ephemeral_ok = True ) )
except:
len_example_url = len( self._example_url )
return ( num_required_path_components, num_total_path_components, num_required_parameters, num_total_parameters, len_example_url )