From b439da96a29308c3d37455af32bc9392d320744f Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 15 Aug 2021 10:31:34 +0200 Subject: [PATCH] ignore error if no readme found --- src/utils/core.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils/core.py b/src/utils/core.py index 1af9f3e..cc459a6 100644 --- a/src/utils/core.py +++ b/src/utils/core.py @@ -193,8 +193,11 @@ def load(variables): return keys def getLavalinkVersion(): - with open(path.join(path.dirname(path.dirname(__file__)), "lavalink/README.md"), "r") as file: - ver = findall(r'Version \*\*(\d+.+)\*\*', file.readlines()[2]) + try: + 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: return ver[0] else: