File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -151,8 +151,8 @@ def ip_analyze(ip: str) -> list[str]:
151151 return [f"{ ip_tuple [0 ]} .{ ip_tuple [1 ]} .{ ip_tuple [2 ]} .{ ip_tuple [3 ]} " ]
152152
153153
154- def format_msg (
155- msg : str ,
154+ def format_data (
155+ data : str ,
156156 max_length : int ,
157157 * ,
158158 errors : Literal ["error" , "warning" , "ignore" ] = "error" ,
@@ -169,7 +169,7 @@ def format_msg(
169169 bytes: The formatted byte array, padded with null bytes if necessary.
170170 """
171171 ret = bytearray ()
172- for s in msg :
172+ for s in data :
173173 c = ord (s )
174174 if c > 0xFFFF :
175175 throw_error (f"Character { s } (0x{ c :X} ) is not supported." , errors = errors )
@@ -202,7 +202,7 @@ def pkg_message(
202202 Raises:
203203 ValueError: If the message length exceeds 800 bytes or if the header length is incorrect
204204 """
205- data = format_msg (msg , 800 , errors = errors )
205+ data = format_data (msg , 800 , errors = errors )
206206 head = (
207207 b"DMOC\x00 \x00 \x01 \x00 \x9e \x03 \x00 \x00 "
208208 + secrets .token_bytes (16 )
You can’t perform that action at this time.
0 commit comments