From fb29c9c0f6c792d2c0a2abc19f49eef41466c1ea Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 30 May 2018 20:25:59 +0300 Subject: [PATCH] Support old version of `monitor_baud` option for device monitor --- platformio/commands/device.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platformio/commands/device.py b/platformio/commands/device.py index 8b6dbd89..78bb7cdc 100644 --- a/platformio/commands/device.py +++ b/platformio/commands/device.py @@ -165,8 +165,10 @@ def device_monitor(**kwargs): # pylint: disable=too-many-branches kwargs['environment']) monitor_options = {k: v for k, v in project_options or []} if monitor_options: - for k in ("port", "baud", "rts", "dtr"): - k2 = "monitor_%s" % ("speed" if k == "baud" else k) + for k in ("port", "baud", "speed", "rts", "dtr"): + k2 = "monitor_%s" % k + if k == "speed": + k = "baud" if kwargs[k] is None and k2 in monitor_options: kwargs[k] = monitor_options[k2] if k != "port":