Part of lp.codehosting.safe_open View In Hierarchy
Method | __init__ | Undocumented |
Method | shouldFollowReferences | Whether we traverse references when mirroring. |
Method | checkOneURL | Check the safety of the source URL. |
Method | transformFallbackLocation | See BranchOpenPolicy.transformFallbackLocation . |
Subclasses must override this method.
If we encounter a branch reference and this returns false, an error is raised.
Returns | A boolean to indicate whether to follow a branch reference. |
Subclasses must override this method.
Parameters | url | The source URL to check. |
Raises | BadUrl | subclasses are expected to raise this or a subclass when it finds a URL it deems to be unsafe. |
BranchOpenPolicy.transformFallbackLocation
.
Here we return the URL that would be used anyway and optionally check it.