Skip to content
Snippets Groups Projects
Commit a499bc0f authored by inso's avatar inso
Browse files

Fix version comparison

parent 81193ac9
Branches
Tags
No related merge requests found
...@@ -8,6 +8,7 @@ import logging ...@@ -8,6 +8,7 @@ import logging
from aiohttp.errors import ClientError from aiohttp.errors import ClientError
import asyncio import asyncio
import random import random
from distutils.version import StrictVersion
class BmaAccess(QObject): class BmaAccess(QObject):
...@@ -173,8 +174,8 @@ class BmaAccess(QObject): ...@@ -173,8 +174,8 @@ class BmaAccess(QObject):
def filter_nodes(self, request, nodes): def filter_nodes(self, request, nodes):
filters = { filters = {
bma.ud.History: lambda n: int(n.version.split(".")[1]) > 11, bma.ud.History: lambda n: StrictVersion(n) > StrictVersion("0.11.0"),
bma.tx.History: lambda n: int(n.version.split(".")[1]) > 11 bma.tx.History: lambda n: StrictVersion(n) > StrictVersion("0.11.0")
} }
if request in filters: if request in filters:
return [n for n in nodes if filters[request](n)] return [n for n in nodes if filters[request](n)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment