fixed bug in get_meteoroids which would recursively call the wrong function

This commit is contained in:
Joel Klimont 2021-10-01 02:46:52 +02:00
parent d58a41da69
commit 3eab71aaf5
4 changed files with 7 additions and 7 deletions

View file

@ -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 \

View file

@ -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}")

View file

@ -1,4 +1,4 @@
__version__ = "0.2.3-0"
__version__ = "0.2.3-1"
import importlib
import compLib.LogstashLogging

View file

@ -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="",