Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 74c1453

Browse files
committed
Catch exceptions only of type Exception
1 parent 3307cba commit 74c1453

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

hyper/http20/connection.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,9 @@ def close(self):
247247

248248
# Send GoAway frame to the server
249249
try:
250-
self._send_cb(GoAwayFrame(0), True)
251-
except:
252-
log.warn(
253-
"GoAway frame could not be sent: %s" % sys.exc_info()[0]
254-
)
250+
self._send_cb(GoAwayFrame(0), True)
251+
except Exception as e:
252+
log.warn("GoAway frame could not be sent: %s" % e)
255253

256254
if self._sock is not None:
257255
self._sock.close()

0 commit comments

Comments
 (0)