@@ -691,7 +691,8 @@ def __handle_burst_read(self, op, _m) -> MAVFTPReturn: # noqa PRL0911, PGH004,
691691 if self .ftp_settings .debug > 0 :
692692 logging .info ("FTP: burst continue at %u %u" , more .offset , self .fh .tell ())
693693 self .__send (more )
694- elif op .opcode == OP_Nack :
694+ return MAVFTPReturn ("BurstReadFile" , ERR_None )
695+ if op .opcode == OP_Nack :
695696 ecode = op .payload [0 ]
696697 if ecode in {ERR_EndOfFile , 0 }:
697698 if not self .reached_eof and op .offset > self .fh .tell ():
@@ -707,12 +708,8 @@ def __handle_burst_read(self, op, _m) -> MAVFTPReturn: # noqa PRL0911, PGH004,
707708 if self .__check_read_finished ():
708709 return MAVFTPReturn ("BurstReadFile" , ERR_None )
709710 self .__check_read_send ()
710- elif self .ftp_settings .debug > 0 :
711- logging .info ("FTP: burst Nack (ecode:%u): %s" , ecode , op )
712- return MAVFTPReturn ("BurstReadFile" , ERR_Fail )
713711 if self .ftp_settings .debug > 0 :
714- logging .error ("FTP: burst nack: %s" , op )
715- return MAVFTPReturn ("BurstReadFile" , ERR_Fail )
712+ logging .info ("FTP: burst Nack (ecode:%u): %s" , ecode , op )
716713 else :
717714 logging .warning ("FTP: burst error: %s" , op )
718715 return MAVFTPReturn ("BurstReadFile" , ERR_Fail )
0 commit comments