Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle checking a hostname of .

  • Loading branch information...
commit 6c0950a49473f6e13812f2e41b325fb880158565 1 parent e008423
@rboulton authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 fastpublicsuffix/publicsuffix.py
View
7 fastpublicsuffix/publicsuffix.py
@@ -23,10 +23,13 @@
def _normalize(s):
- s = s.strip().strip('.').split()[0].lower()
+ s = s.strip().strip('.').split()
+ if len(s) ==0:
+ return ''
+ s = s[0].lower()
try:
return s.decode('utf-8')
- except UnicodeEncodeError, ex:
+ except UnicodeEncodeError:
return s
Please sign in to comment.
Something went wrong with that request. Please try again.