Skip to content

Commit 92c2d81

Browse files
samuelcolvinelprans
authored andcommitted
use explicit if
1 parent 354d9be commit 92c2d81

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

asyncpg/pool.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,8 @@ async def close(self):
684684
raise
685685

686686
finally:
687-
warning_callback and warning_callback.cancel()
687+
if warning_callback is not None:
688+
warning_callback.cancel()
688689
self._closed = True
689690
self._closing = False
690691

0 commit comments

Comments
 (0)