2012. 7. 2. 09:25

try:
    request
= urllib2.Request( url=self.uri+url, headers=self.headers )
    r
= urllib2.urlopen(request)
    xml
= r.read()
   
return parseString( xml )
except urllib2.HTTPError as err:
    logger
.debug("EXCEPTION: %s" % err.read() )
파이썬에서 try catch 는 위와같이 써준다. 

Posted by k1rha