ignore error if no readme found

This commit is contained in:
Mylloon 2021-08-15 10:31:34 +02:00
parent 34726552d7
commit b439da96a2

View file

@ -193,8 +193,11 @@ def load(variables):
return keys return keys
def getLavalinkVersion(): def getLavalinkVersion():
with open(path.join(path.dirname(path.dirname(__file__)), "lavalink/README.md"), "r") as file: try:
ver = findall(r'Version \*\*(\d+.+)\*\*', file.readlines()[2]) with open(path.join(path.dirname(path.dirname(__file__)), "lavalink/README.md"), "r") as file:
ver = findall(r'Version \*\*(\d+.+)\*\*', file.readlines()[2])
except:
return None
if len(ver) == 1: if len(ver) == 1:
return ver[0] return ver[0]
else: else: