Properly handle 404s in BitBucket API layer.
Review Request #7376 — Created June 4, 2015 and submitted
We weren't translating 404 errors into FileNotFound, which could result in
uncaught exceptions when trying to detect whether files existed.
Ran unit tests. The newly-added test fails without the exception handling with
the reported error, and succeeds after.
-
-
reviewboard/hostingsvcs/bitbucket.py (Diff revision 1) This should take the path and revision as arguments.
Change Summary:
Plumb through path and revision in exception.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+12 -1) |
-
Tool: Pyflakes Processed Files: reviewboard/hostingsvcs/bitbucket.py Tool: PEP8 Style Checker Processed Files: reviewboard/hostingsvcs/bitbucket.py
-
I think we need a unit test for this.
-
reviewboard/hostingsvcs/bitbucket.py (Diff revisions 1 - 2) I don't think with_traceback is a thing in Python 2.x. I can't make it work, and it's not in anything but the Python 3 docs.
Testing Done: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||
Diff: |
Revision 3 (+21 -2) |