From 5878c96b2906a06a8bd26df383f4d0ed924b34d3 Mon Sep 17 00:00:00 2001 From: Ritabrata Das Date: Tue, 11 Feb 2025 13:48:03 +0530 Subject: Pipe operator is not supported on Python 3.10 and below, Add Backwards compatiblity --- lib/PacketManager/packets/FSNETCMD_AIRCMD.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PacketManager/packets/FSNETCMD_AIRCMD.py b/lib/PacketManager/packets/FSNETCMD_AIRCMD.py index 6770079..beaade8 100644 --- a/lib/PacketManager/packets/FSNETCMD_AIRCMD.py +++ b/lib/PacketManager/packets/FSNETCMD_AIRCMD.py @@ -1,5 +1,6 @@ from struct import pack, unpack from .constants import AIRCMD_KEYWORDS +from typing import Union # Make it backwards compatible for python 3.9 class FSNETCMD_AIRCMD: #30 @@ -53,7 +54,7 @@ class FSNETCMD_AIRCMD: #30 return FSNETCMD_AIRCMD.encode(aircraft_id, message, with_size) @staticmethod - def set_command(aircraft_id:int, command:str, value:int|str, with_size:bool=False): + def set_command(aircraft_id:int, command:str, value: Union[str, int], with_size:bool=False): """ This will set the command of the aircraft, useful if you want to set the engine power, fuel, etc. -- cgit v1.2.3