Use closing consistently.

This commit is contained in:
Luke Sneeringer
2014-11-04 10:46:17 -06:00
parent 8d99ef116c
commit fd9647ce94
3 changed files with 54 additions and 52 deletions

View File

@@ -74,7 +74,7 @@ class PubSub(object):
Ideally this should be used with `contextmanager.closing` to ensure
well-behavedness:
from contextmanager import closing
from contextlib import closing
with closing(PubSub('foobar')) as foobar:
for message in foobar.subscribe(wait=0.1):