no stdou in wsgi mode

This commit is contained in:
j 2010-09-17 11:41:32 +02:00
parent 6c3c128dc9
commit 13d41faa4f

View file

@ -73,14 +73,14 @@ class PosterCache(models.Model):
data = ox.net.readUrl(url) data = ox.net.readUrl(url)
self.image.save(name, ContentFile(data)) self.image.save(name, ContentFile(data))
except ox.net.urllib2.HTTPError, e: except ox.net.urllib2.HTTPError, e:
import traceback #import traceback
print traceback.print_exc() #print traceback.print_exc()
self.status = e.code self.status = e.code
self.failed = True self.failed = True
self.save() self.save()
except ox.net.urllib2.URLError, e: except ox.net.urllib2.URLError, e:
import traceback #import traceback
print traceback.print_exc() #print traceback.print_exc()
self.status = e.reason self.status = e.reason
self.failed = True self.failed = True
self.save() self.save()