Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

fragile version check comparison #556

Open
infinitewarp opened this issue Aug 14, 2016 · 0 comments
Open

fragile version check comparison #556

infinitewarp opened this issue Aug 14, 2016 · 0 comments
Labels

Comments

@infinitewarp
Copy link
Collaborator

Very minor nitpick I found while reading through the code:
https://github.com/j-e-k/poketrainer/blob/develop/poketrainer/poketrainer.py#L431

if settings.get('minimum_client_version', '0.0.0') > '0.33.0':

That works only in some cases because of how strings do comparisons:

>>> '0.40.0' > '0.33.0'
True
>>> '0.100.0' > '0.33.0'
False

It'll probably be good enough for a long time, but maybe we should do something more robust.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant