diff --git a/ocpp/charge_point.py b/ocpp/charge_point.py index fd1eee363..7314804b1 100644 --- a/ocpp/charge_point.py +++ b/ocpp/charge_point.py @@ -296,10 +296,7 @@ async def _handle_call(self, msg): if not handlers.get("_skip_schema_validation", False): await asyncio.get_event_loop().run_in_executor( - None, - validate_payload, - msg, - self._ocpp_version + None, validate_payload, msg, self._ocpp_version ) # OCPP uses camelCase for the keys in the payload. It's more pythonic # to use snake_case for keyword arguments. Therefore the keys must be @@ -348,10 +345,7 @@ async def _handle_call(self, msg): if not handlers.get("_skip_schema_validation", False): await asyncio.get_event_loop().run_in_executor( - None, - validate_payload, - response, - self._ocpp_version + None, validate_payload, response, self._ocpp_version ) await self._send(response.to_json()) @@ -422,10 +416,7 @@ async def call( if not skip_schema_validation: await asyncio.get_event_loop().run_in_executor( - None, - validate_payload, - call, - self._ocpp_version + None, validate_payload, call, self._ocpp_version ) # Use a lock to prevent make sure that only 1 message can be send at a @@ -450,10 +441,7 @@ async def call( elif not skip_schema_validation: response.action = call.action await asyncio.get_event_loop().run_in_executor( - None, - validate_payload, - response, - self._ocpp_version + None, validate_payload, response, self._ocpp_version ) snake_case_payload = camel_to_snake_case(response.payload)