From 3eab71aaf5c1e8e65637dec8be60df56e7ceb209 Mon Sep 17 00:00:00 2001 From: Joel Klimont Date: Fri, 1 Oct 2021 02:46:52 +0200 Subject: [PATCH] fixed bug in get_meteoroids which would recursively call the wrong function --- build_deb.sh | 2 +- compLib/Api.py | 8 ++++---- compLib/__init__.py | 2 +- setup.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build_deb.sh b/build_deb.sh index 0784496..a4d8e60 100755 --- a/build_deb.sh +++ b/build_deb.sh @@ -34,7 +34,7 @@ fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefi -d "python3-pigpio" \ -d "python3-numpy" \ -d "ffmpeg" \ - -v 0.2.3-0 -t deb setup.py + -v 0.2.3-1 -t deb setup.py # --deb-changelog changelog \ # --deb-upstream-changelog changelog \ diff --git a/compLib/Api.py b/compLib/Api.py index ca6b5f1..4c87a8c 100644 --- a/compLib/Api.py +++ b/compLib/Api.py @@ -194,17 +194,17 @@ class DoubleElim: return response, res.status_code @staticmethod - def get_meteoroid() -> Tuple[Dict, int]: + def get_meteoroid() -> Tuple[List[Dict], int]: """Makes the /api/getMeteoroid call to the api. - :return: A dictionary with all scores included like: {"self":2,"opponent":0} - :rtype: Tuple[Dict, int] + :return: A list will all meteoroids currently on the game field. Meteoroids are dictionaries that look like: {"x": 0, "y": 0} + :rtype: Tuple[List[Dict], int] """ res = requests.get(API_URL_GET_METEOROID) if res.status_code == 408: Logging.get_logger().error(f"DoubleElim.get_meteoroid timeout!") time.sleep(0.01) - return DoubleElim.get_scores() + return DoubleElim.get_meteoroid() response = json.loads(res.content) Logging.get_logger().debug(f"DoubleElim.get_meteoroid = {response}, status code = {res.status_code}") diff --git a/compLib/__init__.py b/compLib/__init__.py index 26296c5..32b824f 100644 --- a/compLib/__init__.py +++ b/compLib/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.2.3-0" +__version__ = "0.2.3-1" import importlib import compLib.LogstashLogging diff --git a/setup.py b/setup.py index b0cece3..451ae11 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ else: setuptools.setup( name="complib", - version="0.2.3-0", + version="0.2.3-1", author="F-WuTs", author_email="--", description="",