Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve replacement of exception
Browse files Browse the repository at this point in the history
hmpf committed Jan 26, 2024
1 parent 22066b6 commit 6dd466d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zinolib/ritz.py
Original file line number Diff line number Diff line change
@@ -391,10 +391,10 @@ def _request(self, command: bytes, recv_buffer=4096, **_):
line, buffer = buffer.split(self.DELIMITER, 1)
rawh = line.split(" ", 1) # ' ' is not a byte
header = (int(rawh[0]), rawh[1])
except ValueError:
except ValueError as e:

Check warning on line 394 in src/zinolib/ritz.py

Codecov / codecov/patch

src/zinolib/ritz.py#L394

Added line #L394 was not covered by tests
raise ProtocolError(
"Illegal response from server detected: %s" % repr(buffer)
)
) from e
# header = line
# Crude error detection :)
if header[0] >= 500:

0 comments on commit 6dd466d

Please sign in to comment.