/loggerhead/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerhead/trunk

« back to all changes in this revision

Viewing changes to loggerhead/controllers/bundle_ui.py

merge jamesh's fix for bug 89854: on error, report an error instead of
trying to redirect to a safe page.  there's no guaranteed safe page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import time
21
21
 
22
22
import turbogears
23
 
from cherrypy import HTTPRedirect, response
 
23
from cherrypy import HTTPRedirect, InternalError, response
24
24
 
25
25
from loggerhead import util
26
26
 
48
48
 
49
49
        try:
50
50
            bundle_data = h.get_bundle(revid, compare_revid)
51
 
        except Exception, x:
52
 
            self.log.error('Exception fetching bundle: %s' % (x,))
53
 
            util.log_exception(self.log)
54
 
            raise HTTPRedirect(self._branch.url('/changes'))
 
51
        except:
 
52
            self.log.exception('Exception fetching bundle')
 
53
            raise InternalError('Could not fetch bundle')
55
54
            
56
55
        response.headers['Content-Type'] = 'text/plain'
57
56
        response.headers['Content-Length'] = len(bundle_data)