From fa0180a6012fb064b88be72cf48e36162edfa8ca Mon Sep 17 00:00:00 2001 From: Paul Guenette Date: Sat, 25 May 2019 21:58:33 +0200 Subject: [PATCH] Revert "dump_errors() should tell you about unknown errors" This reverts commit 5db152b10385787cb47f8f9dae520e28ccb77dda. --- tools/odrive/utils.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/odrive/utils.py b/tools/odrive/utils.py index 8cbb704a..f5ce0c7f 100755 --- a/tools/odrive/utils.py +++ b/tools/odrive/utils.py @@ -53,12 +53,8 @@ def dump_errors(odrv, clear=False): print(prefix + _VT100Colors['red'] + "Error(s):" + _VT100Colors['default']) errorcodes_tup = [(name, val) for name, val in errorcodes.__dict__.items() if 'ERROR_' in name] for codename, codeval in errorcodes_tup: - if remote_obj.error: - print(" ", end='') - if codeval != 0: - print(codename) - else: - print("UNKNOWN_ERROR!") + if remote_obj.error & codeval != 0: + print(" " + codename) if clear: remote_obj.error = errorcodes.ERROR_NONE else: