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