|
13 | 13 | importplatform |
14 | 14 | importgetpass |
15 | 15 | importthreading |
| 16 | +importlogging |
16 | 17 |
|
17 | 18 | # NOTE: Some of the unused imports might be used/imported by others. |
18 | 19 | # Handle once test-cases are back up and running. |
@@ -753,3 +754,12 @@ def wait(self): |
753 | 754 | whileself.count>0: |
754 | 755 | self.cv.wait() |
755 | 756 | self.cv.release() |
| 757 | + |
| 758 | + |
| 759 | +classNullHandler(logging.Handler): |
| 760 | +defemit(self,record): |
| 761 | +pass |
| 762 | + |
| 763 | +# In Python 2.6, there is no NullHandler yet. Let's monkey-patch it for a workaround. |
| 764 | +ifnothasattr(logging,'NullHandler'): |
| 765 | +logging.NullHandler=NullHandler |