We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f44e8f commit a444cc5Copy full SHA for a444cc5
1 file changed
agithub/base.py
@@ -430,3 +430,19 @@ def _filterEmptyHeaders(self, headers):
430
newHeaders[header] = headers[header]
431
432
return newHeaders
433
+
434
+class connectionManager(object):
435
+ '''
436
+ Context manager for handling connections in client.request
437
438
+ def __init__(self, client):
439
+ self.conn = client.get_connection()
440
441
+ def __enter__(self):
442
+ return self.conn
443
444
+ def __exit__(self, exc_type, exc_value, traceback):
445
+ self.conn.close()
446
447
448
0 commit comments