~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/safe_open.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-03 22:16:14 UTC
  • mto: (6437.3.23 2.5)
  • mto: This revision was merged to the branch mainline in revision 6451.
  • Revision ID: jelmer@samba.org-20120103221614-h5l3rsp9b2086szg
make BlacklistPolicy private

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
        raise NotImplementedError(self.check_one_url)
97
97
 
98
98
 
99
 
class BlacklistPolicy(BranchOpenPolicy):
100
 
    """Branch policy that forbids certain URLs."""
 
99
class _BlacklistPolicy(BranchOpenPolicy):
 
100
    """Branch policy that forbids certain URLs.
 
101
 
 
102
    This doesn't cope with various alternative spellings of URLs,
 
103
    with e.g. url encoding. It's mostly useful for tests.
 
104
    """
101
105
 
102
106
    def __init__(self, should_follow_references, unsafe_urls=None):
103
107
        if unsafe_urls is None:
122
126
        return urlutils.join(branch.base, url), False
123
127
 
124
128
 
125
 
class AcceptAnythingPolicy(BlacklistPolicy):
 
129
class AcceptAnythingPolicy(_BlacklistPolicy):
126
130
    """Accept anything, to make testing easier."""
127
131
 
128
132
    def __init__(self):