/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 breezy/transport/memory.py

  • Committer: Breezy landing bot
  • Author(s): Martin
  • Date: 2018-11-17 17:26:21 UTC
  • mfrom: (7183.3.1 lint_E71)
  • Revision ID: breezy.the.bot@gmail.com-20181117172621-uebb7md0dtdn5d9e
Fix E71* lint errors

Mostly moving nots around and a few equality to idenity check changes.

Merged from https://code.launchpad.net/~gz/brz/lint_E71/+merge/358946

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
    def _check_parent(self, _abspath):
123
123
        dir = os.path.dirname(_abspath)
124
124
        if dir != '/':
125
 
            if not dir in self._dirs:
 
125
            if dir not in self._dirs:
126
126
                raise NoSuchFile(_abspath)
127
127
 
128
128
    def has(self, relpath):
135
135
    def delete(self, relpath):
136
136
        """See Transport.delete()."""
137
137
        _abspath = self._abspath(relpath)
138
 
        if not _abspath in self._files:
 
138
        if _abspath not in self._files:
139
139
            raise NoSuchFile(relpath)
140
140
        del self._files[_abspath]
141
141
 
148
148
    def get(self, relpath):
149
149
        """See Transport.get()."""
150
150
        _abspath = self._abspath(relpath)
151
 
        if not _abspath in self._files:
 
151
        if _abspath not in self._files:
152
152
            if _abspath in self._dirs:
153
153
                return LateReadError(relpath)
154
154
            else:
255
255
            if path.startswith(_abspath + '/') and path != _abspath:
256
256
                self._translate_error(
257
257
                    IOError(errno.ENOTEMPTY, relpath), relpath)
258
 
        if not _abspath in self._dirs:
 
258
        if _abspath not in self._dirs:
259
259
            raise NoSuchFile(relpath)
260
260
        del self._dirs[_abspath]
261
261