/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 refs.py

Avoid doing IO in assert.

Show diffs side-by-side

added added

removed removed

Lines of Context:
197
197
            self._map[k].update(v)
198
198
 
199
199
    def load(self, f):
200
 
        assert f.readline() == "unpeel map version 1\n"
 
200
        firstline = f.readline()
 
201
        if firstline != "unpeel map version 1\n":
 
202
            raise AssertionError("invalid format for unpeel map: %r" % firstline)
201
203
        for l in f.readlines():
202
204
            (k, v) = l.split(":", 1)
203
205
            self._map[k.strip()].add(v.strip())