Fix AttributeError: module 'urllib' has no attribute 'parse'

On some systems, the `urllib` package serves as a namespace only and
does not import the `parse` module under it.
This commit is contained in:
Germano Cavalcante
2023-09-19 12:54:51 -03:00
parent b48031df8e
commit d61295155c

View File

@@ -1027,7 +1027,7 @@ class WM_OT_url_open(Operator):
@staticmethod
def _add_utm_param_to_url(url, utm_source):
import urllib
import urllib.parse
# Make sure we have a scheme otherwise we can't parse the url.
if not url.startswith(("http://", "https://")):