File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,13 +227,6 @@ def recv_packet(self, poll_events=False):
227227 start_time = time .time ()
228228 continue # Continue collecting fragments
229229
230- # Either last fragment or non-fragmented packet
231- if fragments :
232- # This is the last fragment - combine all
233- fragments .extend (packet ['payload' ])
234- packet ['payload' ] = bytes (fragments )
235- packet ['length' ] = len (fragments )
236-
237230 # Handle NAK flags
238231 if packet ['flags' ] & Flags .NAK :
239232 # Raise specific exception for all NAK statuses except BUSY
@@ -248,6 +241,13 @@ def recv_packet(self, poll_events=False):
248241 raise OMVException (f"Command failed with status: { Status (status ).name } " )
249242 return False
250243
244+ # Either last fragment or non-fragmented packet
245+ if fragments :
246+ # This is the last fragment - combine all
247+ fragments .extend (packet ['payload' ])
248+ packet ['payload' ] = bytes (fragments )
249+ packet ['length' ] = len (fragments )
250+
251251 # Return payload or True for ACK
252252 return True if not packet ['length' ] else bytes (packet ['payload' ])
253253
You can’t perform that action at this time.
0 commit comments