ignore error if no readme found
This commit is contained in:
parent
34726552d7
commit
b439da96a2
1 changed files with 5 additions and 2 deletions
|
@ -193,8 +193,11 @@ def load(variables):
|
||||||
return keys
|
return keys
|
||||||
|
|
||||||
def getLavalinkVersion():
|
def getLavalinkVersion():
|
||||||
|
try:
|
||||||
with open(path.join(path.dirname(path.dirname(__file__)), "lavalink/README.md"), "r") as file:
|
with open(path.join(path.dirname(path.dirname(__file__)), "lavalink/README.md"), "r") as file:
|
||||||
ver = findall(r'Version \*\*(\d+.+)\*\*', file.readlines()[2])
|
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:
|
||||||
|
|
Reference in a new issue