diff --git a/src/snagflash/fastboot_uboot.py b/src/snagflash/fastboot_uboot.py index 40118de..44a8183 100644 --- a/src/snagflash/fastboot_uboot.py +++ b/src/snagflash/fastboot_uboot.py @@ -262,7 +262,7 @@ def cmd_flash(self, args: str): full_size = ( os.path.getsize(path) if get_compression_method(path) is None - else sys.maxint + else sys.maxsize ) ranges.append((full_size, 0)) @@ -318,11 +318,6 @@ def flash_range( f"flashed {file_bytes_flashed}/{file_size if file_size < sys.maxsize else '?'} bytes" ) - if file_size < sys.maxsize and file_bytes_flashed < file_size: - raise ValueError( - f"Truncated flash, only {file_bytes_flashed} bytes were flashed instead of {file_size} bytes" - ) - def flash_mtd_section( self, fb_addr: int,