From ffd2ba42b823581599ce6f8941d42bf446c9c640 Mon Sep 17 00:00:00 2001 From: Hydrus Network Developer Date: Wed, 27 Mar 2024 17:23:05 -0500 Subject: [PATCH] Revert "Revert "Fix for damaged URL definitions"" This reverts commit 608787e4555fad23498badceba420206c0546b79. --- hydrus/client/networking/ClientNetworkingURLClass.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hydrus/client/networking/ClientNetworkingURLClass.py b/hydrus/client/networking/ClientNetworkingURLClass.py index 57dfcb84..31508427 100644 --- a/hydrus/client/networking/ClientNetworkingURLClass.py +++ b/hydrus/client/networking/ClientNetworkingURLClass.py @@ -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 )