~ubuntu-branches/ubuntu/precise/python2.5/precise

« back to all changes in this revision

Viewing changes to Lib/logging/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-01-31 20:41:23 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100131204123-vourxnj86g6up33x
Tags: 2.5.5-1ubuntu1
* Merge with Debian; remaining changes:
  - Include the pregenerated documentation.
  - Set priority of python2.5-minimal to required.
  - Build python2.5-doc from the pregenerated documentation.
* Regenerate the included documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
#the lock would already have been acquired - so we need an RLock.
177
177
#The same argument applies to Loggers and Manager.loggerDict.
178
178
#
179
 
_lock = None
 
179
if thread:
 
180
    _lock = threading.RLock()
 
181
else:
 
182
    _lock = None
180
183
 
181
184
def _acquireLock():
182
185
    """
184
187
 
185
188
    This should be released with _releaseLock().
186
189
    """
187
 
    global _lock
188
 
    if (not _lock) and thread:
189
 
        _lock = threading.RLock()
190
190
    if _lock:
191
191
        _lock.acquire()
192
192