~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-06 21:45:49 UTC
  • mto: (1946.2.15 reduce-knit-churn)
  • mto: This revision was merged to the branch mainline in revision 1989.
  • Revision ID: john@arbash-meinel.com-20060906214549-1ac6815d44926e1a
Restore mode bit tests for sftp, and track down bugs

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
            if getattr(attr, 'st_mode', None):
159
159
                fd = os.open(path, flags, attr.st_mode)
160
160
            else:
161
 
                fd = os.open(path, flags)
 
161
                # os.open() defaults to 0777 which is
 
162
                # an odd default mode for files
 
163
                fd = os.open(path, flags, 0666)
162
164
        except OSError, e:
163
165
            return SFTPServer.convert_errno(e.errno)
164
166