We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b70d887 commit 01f381aCopy full SHA for 01f381a
jsonrpclib/jsonrpc.py
@@ -286,8 +286,12 @@ def pop_headers(self, headers):
286
:raise AssertionError: The given dictionary is not on the latest stored
287
in the additional headers list
288
"""
289
- assert self.additional_headers[-1] == headers
290
- self.additional_headers.pop()
+ if self.additional_headers[-1] == headers:
+ self.additional_headers.pop()
291
+ else:
292
+ raise AssertionError(
293
+ "Headers to remove are not the top of the stack"
294
+ )
295
296
def emit_additional_headers(self, connection):
297
0 commit comments