mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
Fix urwid version parsing error when it's something like 0.9.10-pre
This commit is contained in:
parent
7d7803a4d9
commit
e56793f01e
@ -114,7 +114,7 @@ def format_flow(f, focus, extended=False, padding=2):
|
||||
|
||||
def int_version(v):
|
||||
SIG = 3
|
||||
v = urwid.__version__.split(".")
|
||||
v = urwid.__version__.split("-")[0].split(".")
|
||||
x = 0
|
||||
for i in range(min(SIG, len(v))):
|
||||
x += int(v[i]) * 10**(SIG-i)
|
||||
|
Loading…
Reference in New Issue
Block a user