From d84abf9e7e53ddb4e63ac20818e9a0b04f25821f Mon Sep 17 00:00:00 2001 From: Richard Neumann Date: Tue, 22 Feb 2022 03:30:58 +0100 Subject: [PATCH] Move function to bottom --- rcon/source/proto.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rcon/source/proto.py b/rcon/source/proto.py index 7adb000..aab7850 100644 --- a/rcon/source/proto.py +++ b/rcon/source/proto.py @@ -16,12 +16,6 @@ LOGGER = getLogger(__file__) TERMINATOR = b'\x00\x00' -def random_request_id() -> LittleEndianSignedInt32: - """Generates a random request ID.""" - - return LittleEndianSignedInt32(randint(0, LittleEndianSignedInt32.MAX)) - - class LittleEndianSignedInt32(int): """A little-endian, signed int32.""" @@ -136,3 +130,9 @@ class Packet(NamedTuple): return cls( random_request_id(), Type.SERVERDATA_AUTH, passwd.encode(encoding) ) + + +def random_request_id() -> LittleEndianSignedInt32: + """Generates a random request ID.""" + + return LittleEndianSignedInt32(randint(0, LittleEndianSignedInt32.MAX))