mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
V3: regex extension on java -version (#2316)
* regex extension on java -version * make it a non capturing group * alphanumeric matching * Match specification: Style, line length * Update manager.py
This commit is contained in:
parent
985e7b3c6d
commit
c4ab34a049
@ -71,7 +71,9 @@ async def get_java_version(loop) -> _JavaVersion:
|
|||||||
# ... version "MAJOR.MINOR.PATCH[_BUILD]" ...
|
# ... version "MAJOR.MINOR.PATCH[_BUILD]" ...
|
||||||
# ...
|
# ...
|
||||||
# We only care about the major and minor parts though.
|
# We only care about the major and minor parts though.
|
||||||
version_line_re = re.compile(r'version "(?P<major>\d+).(?P<minor>\d+).\d+(?:_\d+)?"')
|
version_line_re = re.compile(
|
||||||
|
r'version "(?P<major>\d+).(?P<minor>\d+).\d+(?:_\d+)?(?:-[A-Za-z0-9]+)?"'
|
||||||
|
)
|
||||||
short_version_re = re.compile(r'version "(?P<major>\d+)"')
|
short_version_re = re.compile(r'version "(?P<major>\d+)"')
|
||||||
|
|
||||||
lines = version_info.splitlines()
|
lines = version_info.splitlines()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user