Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tornado/iostream.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def read_until_regex(
gen_log.info("Unsatisfiable read, closing connection: %s" % e)
self.close(exc_info=e)
return future
except:
except Exception:
# Ensure that the future doesn't log an error because its
# failure was never examined.
future.add_done_callback(lambda f: f.exception())
Expand Down Expand Up @@ -383,7 +383,7 @@ def read_until(
gen_log.info("Unsatisfiable read, closing connection: %s" % e)
self.close(exc_info=e)
return future
except:
except Exception:
future.add_done_callback(lambda f: f.exception())
raise
return future
Expand Down Expand Up @@ -411,7 +411,7 @@ def read_bytes(self, num_bytes: int, partial: bool = False) -> Awaitable[bytes]:
self._read_partial = partial
try:
self._try_inline_read()
except:
except Exception:
future.add_done_callback(lambda f: f.exception())
raise
return future
Expand Down Expand Up @@ -456,7 +456,7 @@ def read_into(self, buf: bytearray, partial: bool = False) -> Awaitable[int]:

try:
self._try_inline_read()
except:
except Exception:
future.add_done_callback(lambda f: f.exception())
raise
return future
Expand Down Expand Up @@ -486,7 +486,7 @@ def read_until_close(self) -> Awaitable[bytes]:
self._read_until_close = True
try:
self._try_inline_read()
except:
except Exception:
future.add_done_callback(lambda f: f.exception())
raise
return future
Expand Down