Commit 800d9d33 by Tomas Hlavacek

Fix UTF-8 replace problems in whois

Fix error in parsing/formatting output of whois command due
to UTF-8 errors.
parent f4a09b17
......@@ -40,7 +40,7 @@ def lookup(key):
if(re.match('^\s*$',l) and not begin):
continue
if(l[0] != '%'):
res=res+l.decode('utf-8', errors='replace')
res=res+l.decode('utf-8','replace')
begin = True
return res
......@@ -57,6 +57,6 @@ def lookup_as_name(asn):
m = asname_regex.match(l)
if(m):
asname_cache[asn] = m.group(2)
return m.group(2).decode('utf-8', errors='replace')
return m.group(2).decode('utf-8','replace')
return defaults.STRING_UNKNOWN
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment