From: Ikhyun J. <js...@us...> - 2008-03-09 23:42:40
|
jshiha 08/03/09 16:42:38 Modified: Whois whois.py Log: Fix the bug. It is that some records doesn't have route on KRNIC. Revision Changes Path 1.5 +6 -3 plugins/Whois/whois.py Index: whois.py =================================================================== RCS file: /cvsroot/sugarcube/plugins/Whois/whois.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- whois.py 7 Mar 2008 05:37:34 -0000 1.4 +++ whois.py 9 Mar 2008 23:42:37 -0000 1.5 @@ -33,8 +33,8 @@ Whois(domain, server=None) - Return whois output for domain. """ -__rcs_id__='$Id: whois.py,v 1.4 2008/03/07 05:37:34 jshiha Exp $' -__version__='$Revision: 1.4 $'[11:-2] +__rcs_id__='$Id: whois.py,v 1.5 2008/03/09 23:42:37 jshiha Exp $' +__version__='$Revision: 1.5 $'[11:-2] import os import re @@ -101,7 +101,10 @@ else: r['netname'] = re.findall(r'³×Æ®¿öÅ© À̸§\s+: (.+)', winfo)[0] r['owner'] = re.findall(r'±â°ü¸í\s+: (.+)', winfo)[0] - r['route'] = re.findall(r'¿¬°á ISP¸í\s+: (.+)', winfo)[0] + try: + r['route'] = re.findall(r'¿¬°á ISP¸í\s+: (.+)', winfo)[0] + except: + pass r['source'] = 'KRNIC' return r |