~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-09 18:02:00 UTC
  • mfrom: (1963.2.7 bzr.dev.no_has_key)
  • Revision ID: pqm@pqm.ubuntu.com-20060909180200-96e41112dff213f3
(robey) remove hasattr and == None in favor of getattr() and is None

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
    def open(self, path, flags, attr):
154
154
        path = self._realpath(path)
155
155
        try:
156
 
            if hasattr(os, 'O_BINARY'):
157
 
                flags |= os.O_BINARY
 
156
            flags |= getattr(os, 'O_BINARY', 0)
158
157
            if getattr(attr, 'st_mode', None):
159
158
                fd = os.open(path, flags, attr.st_mode)
160
159
            else: