From 1f5601dae241628b1ec740b09000d2b6b8e1a982 Mon Sep 17 00:00:00 2001 From: Noam Meltzer Date: Wed, 1 Jun 2016 22:38:08 +0300 Subject: [PATCH] fix SyntaxWarning --- telegram/utils/request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telegram/utils/request.py b/telegram/utils/request.py index f43482747..28cca9e41 100644 --- a/telegram/utils/request.py +++ b/telegram/utils/request.py @@ -33,10 +33,11 @@ CON_POOL_SIZE = 1 def _get_con_pool(): + global _CON_POOL + if _CON_POOL is not None: return _CON_POOL - global _CON_POOL _CON_POOL = urllib3.HTTPSConnectionPool( host='api.telegram.org', maxsize=CON_POOL_SIZE,