• Frederik Kriewitz's avatar
    gracefully handle non UTF-8 output of whois · 2df681bf
    Frederik Kriewitz authored
    Fixes exeptions like this (in case whois returns non utf-8 output):
    ERROR in CGI: Traceback (most recent call last):
        File "/var/www/html/ulg.py", line 775, in <module>
        handler.whois(**params)
        File "/var/www/html/ulg.py", line 738, in whois
        print self.runULGWhois(key,objtype)
        File "/var/www/html/ulg.py", line 710, in runULGWhois
        res = whois.lookup(key)
        File "/var/www/html/whois.py", line 43, in lookup
        res=res+l.decode('utf-8')
        File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
        return codecs.utf_8_decode(input, errors, True)
    UnicodeDecodeError: 'utf8' codec can't decode byte 0xf3 in position 24:
    invalid continuation byte
    Signed-off-by: 's avatarTomas Hlavacek <tmshlvck@gmail.com>
    2df681bf
Name
Last commit
Last update
images Loading commit data...
templates Loading commit data...
.gitignore Loading commit data...
CREDITS Loading commit data...
LICENSE Loading commit data...
README Loading commit data...
config.py.example Loading commit data...
defaults.py Loading commit data...
style.css Loading commit data...
tests.py Loading commit data...
tinybox.js Loading commit data...
ulg-cron.py Loading commit data...
ulg.py Loading commit data...
ulgbird.py Loading commit data...
ulgcisco.py Loading commit data...
ulggraph.py Loading commit data...
ulgjuniper.py Loading commit data...
ulgmodel.py Loading commit data...
whois.py Loading commit data...