diff options
author | Chuck Thier <cthier@gmail.com> | 2014-04-10 18:59:01 +0000 |
---|---|---|
committer | John Dickinson <me@not.mn> | 2014-04-10 12:42:11 -0700 |
commit | 1f0058e61e9094cdf9484e982b7f662660bed87e (patch) | |
tree | 262ee5038c9c3bd413096038171358fccafab0fb | |
parent | bd65514ed0dbad6c2d562da5d440210b3f61cba3 (diff) | |
download | swift-1.13.1.tar.gz |
Fix logging issue when services stop on py261.13.1.rc21.13.1
On older versions of python 2.6, exceptions would be spewed to the error
log whenever a service would stop. This gets magnified by the
container-updater which seems to do it with every pass. This catches
and squelches the error.
Change-Id: I5944c1620c62cf0868b70dae7d7e2acd56bf8211
Closes-Bug: #1306027
-rw-r--r-- | swift/common/utils.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/swift/common/utils.py b/swift/common/utils.py index 5281be941..8a840ae00 100644 --- a/swift/common/utils.py +++ b/swift/common/utils.py @@ -856,8 +856,12 @@ class LoggingHandlerWeakRef(weakref.ref): """ def close(self): referent = self() - if referent: - referent.close() + try: + if referent: + referent.close() + except KeyError: + # This is to catch an issue with old py2.6 versions + pass def flush(self): referent = self() |