~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store.py

  • Committer: Robert Collins
  • Date: 2005-09-12 12:28:19 UTC
  • mfrom: (1185.3.4)
  • mto: (1092.3.2)
  • mto: This revision was merged to the branch mainline in revision 1397.
  • Revision ID: robertc@robertcollins.net-20050912122819-e3f141d4a14f3f7f
mergeĀ fromĀ HEAD

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
        super(ImmutableStore, self).__init__()
92
92
        self._basedir = basedir
93
93
 
94
 
    def _path(self, id):
95
 
        if '\\' in id or '/' in id:
96
 
            raise ValueError("invalid store id %r" % id)
97
 
        return os.path.join(self._basedir, id)
 
94
    def _path(self, entry_id):
 
95
        if not isinstance(entry_id, basestring):
 
96
            raise TypeError(type(entry_id))
 
97
        if '\\' in entry_id or '/' in entry_id:
 
98
            raise ValueError("invalid store id %r" % entry_id)
 
99
        return os.path.join(self._basedir, entry_id)
98
100
 
99
101
    def __repr__(self):
100
102
        return "%s(%r)" % (self.__class__.__name__, self._basedir)