~david-goetz/swift/walt

« back to all changes in this revision

Viewing changes to swift/container/server.py

  • Committer: Tarmac
  • Author(s): David Goetz
  • Date: 2011-01-26 23:56:47 UTC
  • mfrom: (176.1.2 bare_except)
  • Revision ID: tarmac-20110126235647-rvhywh8z0vh2qm4j
Removing bare excepts from code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
import simplejson
26
26
from eventlet.timeout import Timeout
 
27
from eventlet import TimeoutError
27
28
from webob import Request, Response
28
29
from webob.exc import HTTPAccepted, HTTPBadRequest, HTTPConflict, \
29
30
    HTTPCreated, HTTPInternalServerError, HTTPNoContent, \
118
119
                             'device': account_device,
119
120
                             'status': account_response.status,
120
121
                             'reason': account_response.reason})
121
 
            except:
 
122
            except (Exception, TimeoutError):
122
123
                self.logger.exception(_('ERROR account update failed with '
123
124
                    '%(ip)s:%(port)s/%(device)s (will retry later)'),
124
125
                    {'ip': account_ip, 'port': account_port,
393
394
                    res = getattr(self, req.method)(req)
394
395
                else:
395
396
                    res = HTTPMethodNotAllowed()
396
 
            except:
 
397
            except Exception:
397
398
                self.logger.exception(_('ERROR __call__ error with %(method)s'
398
399
                    ' %(path)s '), {'method': req.method, 'path': req.path})
399
400
                res = HTTPInternalServerError(body=traceback.format_exc())