no more display data when Page is not found

This commit is contained in:
Christophe Benz 2010-07-12 03:14:17 +02:00
commit 351622debc

View file

@ -314,11 +314,11 @@ class BaseBrowser(mechanize.Browser):
# Not found # Not found
if not pageCls: if not pageCls:
self.page = None self.page = None
r = result.read() #data = result.read()
if isinstance(r, unicode): #if isinstance(data, unicode):
r = r.encode('iso-8859-15', 'replace') # data = data.encode('utf-8')
print r #print data
warning('Ho my fucking god, there isn\'t any page named %s' % result.geturl()) warning('Oh my fucking god, there isn\'t any page corresponding to URL %s' % result.geturl())
return return
debug('[user_id=%s] Went on %s' % (self.username, result.geturl())) debug('[user_id=%s] Went on %s' % (self.username, result.geturl()))