Merge "Py3: Fix two unbound variables"
This commit is contained in:
commit
7f8e1f8ff4
@ -1527,10 +1527,11 @@ class ContainerSharder(ContainerReplicator):
|
||||
self._increment_stat('visited', 'success', statsd=True)
|
||||
else:
|
||||
self._increment_stat('visited', 'skipped')
|
||||
except (Exception, Timeout) as error:
|
||||
except (Exception, Timeout) as err:
|
||||
self._increment_stat('visited', 'failure', statsd=True)
|
||||
self.logger.exception(
|
||||
'Unhandled exception while processing %s: %s', path, error)
|
||||
'Unhandled exception while processing %s: %s', path, err)
|
||||
error = err
|
||||
try:
|
||||
self._record_sharding_progress(broker, node, error)
|
||||
except (Exception, Timeout) as error:
|
||||
|
@ -744,10 +744,9 @@ class TestObjectExpirer(TestCase):
|
||||
x.run_once = raise_exceptions
|
||||
x.run_forever()
|
||||
except SystemExit as err:
|
||||
pass
|
||||
self.assertEqual(str(err), 'exiting exception 2')
|
||||
finally:
|
||||
expirer.sleep = orig_sleep
|
||||
self.assertEqual(str(err), 'exiting exception 2')
|
||||
self.assertEqual(x.logger.get_lines_for_level('error'),
|
||||
['Unhandled exception: '])
|
||||
log_args, log_kwargs = x.logger.log_dict['error'][0]
|
||||
|
Loading…
Reference in New Issue
Block a user