Use our own redbot.core.VersionInfo over distutils.StrictVersion (#2188)

* Implements our required subset of PEP 440 in redbot.core.VersionInfo
* Added unit tests for version string parsing and comparisons

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine
2018-10-06 19:11:05 +10:00
committed by GitHub
parent de4b42a11e
commit 91029b73e5
6 changed files with 187 additions and 49 deletions

View File

@@ -34,7 +34,7 @@ async def download_lavalink(session):
async def maybe_download_lavalink(loop, cog):
jar_exists = LAVALINK_JAR_FILE.exists()
current_build = redbot.core.VersionInfo(*await cog.config.current_build())
current_build = redbot.core.VersionInfo.from_json(await cog.config.current_build())
if not jar_exists or current_build < redbot.core.version_info:
log.info("Downloading Lavalink.jar")