From 3cc8c09339db03653c751c1cf76f6f30520305a8 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Mon, 8 Oct 2018 16:55:59 -0700 Subject: [PATCH] change a var name --- tools/odrive/dfu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/odrive/dfu.py b/tools/odrive/dfu.py index 6283b81a..9dc5f6d9 100755 --- a/tools/odrive/dfu.py +++ b/tools/odrive/dfu.py @@ -338,8 +338,8 @@ def update_device(device, firmware, logger, cancellation_token): # Back up configuration if dfudev is None: - did_backup_config = device.user_config_loaded if hasattr(device, 'user_config_loaded') else False - if did_backup_config: + do_backup_config = device.user_config_loaded if hasattr(device, 'user_config_loaded') else False + if do_backup_config: odrive.configuration.backup_config(device, None, logger) elif not odrive.utils.yes_no_prompt("The configuration cannot be backed up because the device is already in DFU mode. The configuration may be lost after updating. Do you want to continue anyway?", True): raise OperationAbortedException() @@ -414,7 +414,7 @@ def update_device(device, firmware, logger, cancellation_token): device = odrive.find_any("usb", serial_number, cancellation_token, cancellation_token, timeout=30) - if did_backup_config: + if do_backup_config: odrive.configuration.restore_config(device, None, logger) os.remove(odrive.configuration.get_temp_config_filename(device))