Comment 9 for bug 925951

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: Branch on dead webhost in history prevents explorer opening

@Martin, more interesting thing that actually internal launchpad plugin has raised SocketConnectionError, while the code in explorer expects to get NotLaunchpadBranch only. See explorer/lib/hosted_url_resolver.py:

    def get_branch_url(self, location='.'):
        """Get the web branch URL for a given location.

        @return: the URL as a string or None if none.
        """
        # TODO: generalise this to support sites other than Launchpad, e.g.
        # Savannah and/or Loggerhead on an Intranet server.
        try:
            # Note: this only checks the public location and the push location.
            # I think it ought to check the bound and parent locations as well.
            # See https://bugs.launchpad.net/bzr/+bug/488057.
            return self._lp_open_cmd._get_web_url(self._lp_service, location)
        except NotLaunchpadBranch:
            return None

So, should we catch socket errors here? Or should launchpad plugin be improved in that area?