diff --git a/swift/common/middleware/x_profile/html_viewer.py b/swift/common/middleware/x_profile/html_viewer.py index 1132c6aa59..85426a93c0 100644 --- a/swift/common/middleware/x_profile/html_viewer.py +++ b/swift/common/middleware/x_profile/html_viewer.py @@ -386,8 +386,8 @@ class HTMLViewer(object): else: data = stats.print_stats() return data, [('content-type', self.format_dict[output_format])] - except ODFLIBNotInstalled as ex: - raise ex + except ODFLIBNotInstalled: + raise except Exception as ex: raise ProfileException(_('Data download error: %s') % ex) diff --git a/swift/container/sync.py b/swift/container/sync.py index 1c94d9a679..99df2e4be2 100644 --- a/swift/container/sync.py +++ b/swift/container/sync.py @@ -429,8 +429,6 @@ class ContainerSync(Daemon): sync_stage_time = time() self.container_syncs += 1 self.logger.increment('syncs') - except Exception as ex: - raise ex finally: self.container_report(start_at, sync_stage_time, sync_point1,