Remove usages of die() from the API cache
Review Request #7298 — Created May 13, 2015 and submitted
All usages of
die
in the HTTP cache for the API have now been
replaced to raise a new exception,CacheError
, instead.The
--cache-location
flag is now accepted byclearcache
and the
--disable-cache
flag (which was added by mistake) was removed.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
What do you think about moving this into errors.py? |
chipx86 | |
Let's build the message in each case, and then do the super() at the end only once. |
chipx86 | |
e should be on the next line. Also, the error should be in sentence casing. Same with the others below. |
chipx86 | |
local variable 'e' is assigned to but never used |
reviewbot | |
I thought it was okay having this in CacheError. What led to the move? |
chipx86 |
-
-
-
rbtools/api/cache.py (Diff revision 1) Let's build the message in each case, and then do the
super()
at the end only once. -
rbtools/api/cache.py (Diff revision 1) e
should be on the next line.Also, the error should be in sentence casing.
Same with the others below.
Change Summary:
- Move
CacheError
intoapi.errors
. - Move
CacheError
intoAPICache._die
so thatCacheError
does not referenceAPICache
. - Fix casing.
- Build error message only once in
_die
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+31 -23) |
-
Tool: Pyflakes Processed Files: rbtools/api/errors.py rbtools/api/cache.py rbtools/commands/clearcache.py Tool: PEP8 Style Checker Processed Files: rbtools/api/errors.py rbtools/api/cache.py rbtools/commands/clearcache.py
-
Change Summary:
Fix call to
_die
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+31 -23) |
-
Tool: Pyflakes Processed Files: rbtools/api/errors.py rbtools/api/cache.py rbtools/commands/clearcache.py Tool: PEP8 Style Checker Processed Files: rbtools/api/errors.py rbtools/api/cache.py rbtools/commands/clearcache.py
-
-
rbtools/api/cache.py (Diff revision 3) I thought it was okay having this in
CacheError
. What led to the move?