[66] fix ratings file

This commit is contained in:
meisnate12 2022-12-19 19:18:51 -05:00
parent 1afefd3ab0
commit c0e1913a88
3 changed files with 15 additions and 5 deletions

View file

@ -1 +1 @@
1.18.0-develop65
1.18.0-develop66

View file

@ -235,11 +235,11 @@ templates:
- rating_alignment: horizontal
horizontal_position: center
rating1: none
value: <<ch2_offset>>
value: -<<ch2_offset>>
- rating_alignment: horizontal
horizontal_position: center
rating3: none
value: -<<ch2_offset>>
value: <<ch2_offset>>
- rating_alignment: horizontal
horizontal_position: center
value: <<center_offset>>

View file

@ -983,7 +983,12 @@ class ConfigFile:
return html.fromstring(self.get(url, headers=headers, params=params).content)
def get_json(self, url, json=None, headers=None, params=None):
return self.get(url, json=json, headers=headers, params=params).json()
response = self.get(url, json=json, headers=headers, params=params)
try:
return response.json()
except ValueError:
logger.error(str(response.content))
raise
@retry(stop_max_attempt_number=6, wait_fixed=10000)
def get(self, url, json=None, headers=None, params=None):
@ -996,7 +1001,12 @@ class ConfigFile:
return html.fromstring(self.post(url, data=data, json=json, headers=headers).content)
def post_json(self, url, data=None, json=None, headers=None):
return self.post(url, data=data, json=json, headers=headers).json()
response = self.post(url, data=data, json=json, headers=headers)
try:
return response.json()
except ValueError:
logger.error(str(response.content))
raise
@retry(stop_max_attempt_number=6, wait_fixed=10000)
def post(self, url, data=None, json=None, headers=None):