diff -r python271/__init__.py logging/__init__.py 0a1,17 > # _________________________________________________________________________ > # > # PyUtilib: A Python utility library. > # Copyright (c) 2008 Sandia Corporation. > # This software is distributed under the BSD License. > # Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, > # the U.S. Government retains certain rights in this software. > # _________________________________________________________________________ > # > # This package includes revisions of the Python logging package (taken from > # Python 2.7. The goal of these revisions is to support caching of the > # values of the Logger.isEnabledFor() method. > # > # Plus ... other edits needed to make this version of threading backwards compatible to > # Python 2.5 > # > 284c301,304 < self.threadName = threading.current_thread().name --- > if sys.version_info[:2] < (2,6): > self.threadName = threading.currentThread().getName() > else: > self.threadName = threading.current_thread().name 795a816 > try: 800c821 < except IOError: --- > except IOError: 992a1014 > self.status = 0 1102a1125,1126 > self.level_status = -1 > self.enabledFor = {} 1108a1133 > self.manager.status += 1 1327a1353,1359 > if self.level_status < self.manager.status: > for lvl in [DEBUG, INFO, WARNING, ERROR, CRITICAL]: > self.enabledFor[lvl] = self._isEnabledFor(lvl) > self.level_status = self.manager.status > return self.enabledFor[level] > > def _isEnabledFor(self, level): 1613a1646 > root.manager.status += 1