Merge pull request #2 from zellux/master

Fix urwid version parsing error when it's something like 0.9.10-pre
This commit is contained in:
Aldo Cortesi 2011-06-20 02:46:08 -07:00
commit 00929a51c0
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ def format_flow(f, focus, extended=False, padding=2):
def int_version(v): def int_version(v):
SIG = 3 SIG = 3
v = urwid.__version__.split(".") v = urwid.__version__.split("-")[0].split(".")
x = 0 x = 0
for i in range(min(SIG, len(v))): for i in range(min(SIG, len(v))):
x += int(v[i]) * 10**(SIG-i) x += int(v[i]) * 10**(SIG-i)