Skip to content

Commit

Permalink
Merge "Fix logging issue when services stop on py26"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Apr 11, 2014
2 parents 3525a03 + 2c2ede2 commit e2ab530
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions swift/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,8 +878,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()
Expand Down

0 comments on commit e2ab530

Please sign in to comment.