Remove CommandError usage from rbtools.utils
Review Request #9897 — Created April 30, 2018 and submitted
CommandError is intended to be used only within
rbtools.commands
, and
it was a layering violation to use it from util code. I've swapped out
the places that raised it to instead use other, more appropriate
exception types, and then the commands that call those APIs can catch
and handle those.
- Tested (most of) the various error conditions that caused the problems.
- Ran unit tests.
Description | From | Last Updated |
---|---|---|
F821 undefined name 'six' |
reviewbot | |
F821 undefined name 'six' |
reviewbot | |
F821 undefined name 'review_request_id' |
reviewbot | |
Can we use keyword arguments here, to help with readability? |
chipx86 | |
Maybe worth inversing this? if i == num_retries - 1: raise logging.error(...) Maybe getting into the weeds here, but that … |
chipx86 | |
There's no need for an else. The raise ends things for this function. |
chipx86 |
- Commit:
-
16e3b5106424e833e768c74ef00158371f1902832d08e972aed0d6934b4a3d4f4b0da95e62b8624a
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.
- Commit:
-
2d08e972aed0d6934b4a3d4f4b0da95e62b8624aefe69ac632a9df7f21aed5a3c2adaa9a418bebc2
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.