/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/url_policy_open.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
import threading
22
22
 
23
 
from bzrlib import (
 
23
from . import (
24
24
    errors,
25
25
    urlutils,
26
26
    )
27
 
from bzrlib.branch import Branch
28
 
from bzrlib.controldir import (
 
27
from .branch import Branch
 
28
from .controldir import (
29
29
    ControlDir,
30
30
    )
31
31
 
212
212
 
213
213
        This is in a module-level function rather than performed at module
214
214
        level so that it can be called in setUp for testing `BranchOpener`
215
 
        as bzrlib.tests.TestCase.setUp clears hooks.
 
215
        as breezy.tests.TestCase.setUp clears hooks.
216
216
        """
217
217
        Branch.hooks.install_named_hook(
218
218
            'transform_fallback_location',
290
290
        What is acceptable means is defined by the policy's `follow_reference` and
291
291
        `check_one_url` methods.
292
292
        """
293
 
        if type(url) != str:
 
293
        if not isinstance(url, str):
294
294
            raise TypeError
295
295
 
296
296
        url = self.check_and_follow_branch_reference(url)