Skip to content

Commit 76b9b3a

Browse files
authored
Update serial_ext.py
- replaced with oneliner - removed default arguments
1 parent 7d75213 commit 76b9b3a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tools/idf_py_actions/serial_ext.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,7 @@ def monitor(action, ctx, args, print_filter, monitor_baud, encrypted):
8585
monitor_args += ["-p", args.port]
8686

8787
if not monitor_baud:
88-
if os.getenv("IDF_MONITOR_BAUD"):
89-
monitor_baud = os.getenv("IDF_MONITOR_BAUD", None)
90-
elif os.getenv("MONITORBAUD"):
91-
monitor_baud = os.getenv("MONITORBAUD", None)
92-
else:
93-
monitor_baud = project_desc["monitor_baud"]
88+
monitor_baud = os.getenv("IDF_MONITOR_BAUD") or os.getenv("MONITORBAUD") or project_desc["monitor_baud"]
9489

9590
monitor_args += ["-b", monitor_baud]
9691
monitor_args += ["--toolchain-prefix", project_desc["monitor_toolprefix"]]

0 commit comments

Comments
 (0)