diff options
author | Helmut Grohne <helmut@subdivi.de> | 2020-04-02 22:35:04 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2020-04-02 22:35:04 +0200 |
commit | be6834fe527823a64269c5ab1107af4c97882a44 (patch) | |
tree | 8d18e6f1d76df4e4a6f6d76704828e6e4d09a025 /wsgitools/scgi/asynchronous.py | |
parent | b12055c53b09eababd1fa7260ecbe4e2e26425e9 (diff) | |
download | wsgitools-be6834fe527823a64269c5ab1107af4c97882a44.tar.gz |
avoid changing variable types
The mypy type checker deals badly when a binding changes its type. To
ease porting to mypy, avoid changing the type of variables. In some
cases, variables can be eliminated. In other cases, they are renamed.
Diffstat (limited to 'wsgitools/scgi/asynchronous.py')
-rw-r--r-- | wsgitools/scgi/asynchronous.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wsgitools/scgi/asynchronous.py b/wsgitools/scgi/asynchronous.py index 80b5803..15594c9 100644 --- a/wsgitools/scgi/asynchronous.py +++ b/wsgitools/scgi/asynchronous.py @@ -77,9 +77,9 @@ class SCGIConnection(asyncore.dispatcher): self.inbuff += data if self.state == SCGIConnection.NEW: if b':' in self.inbuff: - reqlen, self.inbuff = self.inbuff.split(b':', 1) + reqlenb, self.inbuff = self.inbuff.split(b':', 1) try: - reqlen = int(reqlen) + reqlen = int(reqlenb) except ValueError: # invalid request format self.close() return |