From 0f9ea7ee263e4fbac6f125b568f4c4d2a70486f8 Mon Sep 17 00:00:00 2001 From: Jelmer Date: Sat, 22 Jul 2023 08:44:01 +0200 Subject: [PATCH] fixed flasher python script --- ESP32_AP-Flasher/OEPL-Flash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ESP32_AP-Flasher/OEPL-Flash.py b/ESP32_AP-Flasher/OEPL-Flash.py index 03c1d628..31591929 100644 --- a/ESP32_AP-Flasher/OEPL-Flash.py +++ b/ESP32_AP-Flasher/OEPL-Flash.py @@ -3,7 +3,7 @@ import serial.tools.list_ports import serial import time from intelhex import IntelHex - +import os.path CMD_GET_VERSION = 1 CMD_RESET_ESP = 2 @@ -107,7 +107,7 @@ def validate_arguments(args): if args.command == "write" and not os.path.isfile(args.filename): print("Couldn't find the specified file!") return False; - if not args.filename: + if args.command in ["read", "write"] and not args.filename: print("Please specify a file to save read data") return False; if args.command == "read" and len(args.filename) < 2: