Fix urwid version parsing error when it's something like 0.9.10-pre

This commit is contained in:
Yuangxuan Wang 2011-06-20 16:17:59 +08:00 committed by Yuanxuan Wang
parent 7d7803a4d9
commit e56793f01e

View File

@ -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)