/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Martin Pool
  • Date: 2008-04-24 07:22:53 UTC
  • mto: This revision was merged to the branch mainline in revision 3415.
  • Revision ID: mbp@sourcefrog.net-20080424072253-opmjij7xfy38w27f
Remove every assert statement from bzrlib!

Depending on the context they are:

 * turned into an explicit if/raise of either AssertionError 
   or something more specific -- particularly where they protect
   programming interfaces, complex invariants, or data file integrity
 * removed, if they're redundant with a later check, not protecting
   a meaningful invariant
 * turned into a selftest method on tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
        :param path: Path to the lock within the base directory of the 
168
168
            transport.
169
169
        """
170
 
        assert isinstance(transport, Transport), \
171
 
            ("not a transport: %r" % transport)
172
170
        self.transport = transport
173
171
        self.path = path
174
172
        self._lock_held = False
417
415
        try:
418
416
            info = self._read_info_file(self._held_info_path)
419
417
            self._trace("peek -> held")
420
 
            assert isinstance(info, dict), \
421
 
                    "bad parse result %r" % info
422
418
            return info
423
419
        except NoSuchFile, e:
424
420
            self._trace("peek -> not held")