Correct reraising of exception
When an exception was caught and rethrown, it should call 'raise' without any arguments because it shows the place where an exception occured initially instead of place where the exception re-raised. Change-Id: I326dd8eaf221cbf3729beedaff81b416c59ae2e6
This commit is contained in:
parent
561284e3d4
commit
b53214e30b
@ -316,7 +316,7 @@ class Manager(object):
|
||||
except OSError as e:
|
||||
# PID died before kill_group can take action?
|
||||
if e.errno != errno.ESRCH:
|
||||
raise e
|
||||
raise
|
||||
else:
|
||||
print(_('Waited %(kill_wait)s seconds for %(server)s '
|
||||
'to die; giving up') %
|
||||
|
@ -1727,7 +1727,7 @@ def get_logger(conf, name=None, log_to_console=False, log_route=None,
|
||||
except socket.error as e:
|
||||
# Either /dev/log isn't a UNIX socket or it does not exist at all
|
||||
if e.errno not in [errno.ENOTSOCK, errno.ENOENT]:
|
||||
raise e
|
||||
raise
|
||||
handler = SysLogHandler(facility=facility)
|
||||
handler.setFormatter(formatter)
|
||||
logger.addHandler(handler)
|
||||
|
Loading…
x
Reference in New Issue
Block a user