From 24bde91248079dad9763b4630de745c0bb520960 Mon Sep 17 00:00:00 2001 From: reahaas Date: Thu, 27 Feb 2020 20:06:26 +0200 Subject: [PATCH] Update domain.py Catch the AttributeError exception and return False. --- validators/domain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validators/domain.py b/validators/domain.py index 808d3b05..1c1ce232 100644 --- a/validators/domain.py +++ b/validators/domain.py @@ -58,5 +58,5 @@ def domain(value): """ try: return pattern.match(to_unicode(value).encode('idna').decode('ascii')) - except UnicodeError: + except (UnicodeError, AttributeError): return False pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy