You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# If no name is given, generate a random UUID.ifnameisNone:
uuid=_uu.uuid4()
elif"http"notinname.lower():
uuid=_uu.uuid5(_uu.NAMESPACE_DNS, name)
else:
uuid=_uu.uuid5(_uu.NAMESPACE_URL, name)
However, this should check for http:// or https:// at the beginning of the string, not anywhere in the middle, as it'll currently consider myhttpdomain.com as a URL instead of a domain. The correct if condition is: elif not name.lower().startswith(('http://', 'https://'))
The text was updated successfully, but these errors were encountered:
ShortUUID determines namespace using the following code:
However, this should check for
http://
orhttps://
at the beginning of the string, not anywhere in the middle, as it'll currently considermyhttpdomain.com
as a URL instead of a domain. The correct if condition is:elif not name.lower().startswith(('http://', 'https://'))
The text was updated successfully, but these errors were encountered: