Note that lock.py has other problems, as reported by pyflakes. E.g. line 151 and 152 have references to 'lock' which should probably be alt_lock, though I'm not positive about that. And line 176 has a reference to TransactionCancelled() which is also undefined. The logging one is shallow though so I'll try to fix that now and file bugs for the other problems.
Note that lock.py has other problems, as reported by pyflakes. E.g. line 151 and 152 have references to 'lock' which should probably be alt_lock, though I'm not positive about that. And line 176 has a reference to TransactionCanc elled() which is also undefined. The logging one is shallow though so I'll try to fix that now and file bugs for the other problems.