diff options
author | William Grzybowski <wg@FreeBSD.org> | 2014-09-20 15:19:34 +0000 |
---|---|---|
committer | William Grzybowski <wg@FreeBSD.org> | 2014-09-20 15:19:34 +0000 |
commit | e74eb1336611623e44ef6a7970488c7b8ccaa4eb (patch) | |
tree | 045d8ff9278b7bc49221a732ba8a35bb8c9f18bd /www/calendarserver/files/patch-twext_python_log.py | |
parent | - Update to version 0.52 [1] (diff) |
www/calendarserver: Calendar and Contacts Server from Apple (RFC 4791, RFC 6352)
The open source Calendar and Contacts Server project is a standards-compliant
server implementing the CalDAV and CardDAV protocols (RFC 4791, RFC 6352).
It provides a shared location on the network allowing multiple users to store
and edit calendaring and contact information.
WWW: http://www.calendarserver.org
PR: 186201 (with changes)
Submitted by: Axel.Rau Chaos1 de
Diffstat (limited to 'www/calendarserver/files/patch-twext_python_log.py')
-rw-r--r-- | www/calendarserver/files/patch-twext_python_log.py | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/www/calendarserver/files/patch-twext_python_log.py b/www/calendarserver/files/patch-twext_python_log.py new file mode 100644 index 000000000000..d33e79bd125f --- /dev/null +++ b/www/calendarserver/files/patch-twext_python_log.py @@ -0,0 +1,52 @@ +Index: twext/trunk/twext/python/log.py +=================================================================== +--- twext/python/log.py.orig 2013-09-17 23:08:55.000000000 +0000 ++++ twext/python/log.py 2014-01-22 09:29:56.000000000 +0000 +@@ -932,24 +932,29 @@ + # Don't patch this module + if moduleName is __name__: + continue +- +- for name, obj in module.__dict__.iteritems(): +- newLogger = Logger(namespace=module.__name__) +- legacyLogger = LegacyLogger(logger=newLogger) +- +- if obj is twisted.python.log: +- log.info("Replacing Twisted log module object {0} in {1}" +- .format(name, module.__name__)) +- setattr(module, name, legacyLogger) +- elif obj is twisted.python.log.msg: +- log.info("Replacing Twisted log.msg object {0} in {1}" +- .format(name, module.__name__)) +- setattr(module, name, legacyLogger.msg) +- elif obj is twisted.python.log.err: +- log.info("Replacing Twisted log.err object {0} in {1}" +- .format(name, module.__name__)) +- setattr(module, name, legacyLogger.err) +- ++ ++ try: ++ for name, obj in module.__dict__.iteritems(): ++ newLogger = Logger(namespace=module.__name__) ++ legacyLogger = LegacyLogger(logger=newLogger) ++ ++ if obj is twisted.python.log: ++ log.info("Replacing Twisted log module object {0} in {1}" ++ .format(name, module.__name__)) ++ setattr(module, name, legacyLogger) ++ elif obj is twisted.python.log.msg: ++ log.info("Replacing Twisted log.msg object {0} in {1}" ++ .format(name, module.__name__)) ++ setattr(module, name, legacyLogger.msg) ++ elif obj is twisted.python.log.err: ++ log.info("Replacing Twisted log.err object {0} in {1}" ++ .format(name, module.__name__)) ++ setattr(module, name, legacyLogger.err) ++ except (AttributeError, RuntimeError,): ++ # Can't look up __name__. A hack in the "six" module causes ++ # this. Skip the module. ++ # See https://trac.calendarserver.org/ticket/832 ++ continue + + + ###################################################################### |