mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Changed iteration to list comprehension in order to prevent "RuntimeError: dictionary changed size during iteration"
This commit is contained in:
parent
49e10d7cc2
commit
b456c3afa1
@ -18,6 +18,7 @@ Unreleased: mitmproxy next
|
|||||||
* mitmweb: "New -> File" menu option has been renamed to "Clear All" (@yogeshojha)
|
* mitmweb: "New -> File" menu option has been renamed to "Clear All" (@yogeshojha)
|
||||||
* Add new MapRemote addon to rewrite URLs of requests (@mplattner)
|
* Add new MapRemote addon to rewrite URLs of requests (@mplattner)
|
||||||
* Add support for HTTP Trailers to the HTTP/2 protocol (@sanlengjingvv and @Kriechi)
|
* Add support for HTTP Trailers to the HTTP/2 protocol (@sanlengjingvv and @Kriechi)
|
||||||
|
* Fix certificate runtime error during expire cleanup (@gorogoroumaru)
|
||||||
|
|
||||||
* --- TODO: add new PRs above this line ---
|
* --- TODO: add new PRs above this line ---
|
||||||
|
|
||||||
|
@ -173,9 +173,7 @@ class CertStore:
|
|||||||
self.expire_queue.append(entry)
|
self.expire_queue.append(entry)
|
||||||
if len(self.expire_queue) > self.STORE_CAP:
|
if len(self.expire_queue) > self.STORE_CAP:
|
||||||
d = self.expire_queue.pop(0)
|
d = self.expire_queue.pop(0)
|
||||||
for k, v in list(self.certs.items()):
|
self.certs = {k: v for k, v in self.certs.items() if v != d}
|
||||||
if v == d:
|
|
||||||
del self.certs[k]
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def load_dhparam(path):
|
def load_dhparam(path):
|
||||||
|
Loading…
Reference in New Issue
Block a user