From 305a4ae417089a17e6314055e37c4d74b1ecc978 Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Thu, 7 Sep 2006 19:28:16 -0700 Subject: [PATCH] [project @ robey@lag.net-20060908022816-ea2856cefb9d83e0] fix from john arbash-meinel for the stub sftp server's default open mode --- tests/stub_sftp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/stub_sftp.py b/tests/stub_sftp.py index 2eb5f24..dedb78a 100644 --- a/tests/stub_sftp.py +++ b/tests/stub_sftp.py @@ -97,7 +97,9 @@ class StubSFTPServer (SFTPServerInterface): if mode is not None: fd = os.open(path, flags, mode) else: - fd = os.open(path, flags) + # os.open() defaults to 0777 which is + # an odd default mode for files + fd = os.open(path, flags, 0666) except OSError, e: return SFTPServer.convert_errno(e.errno) if (flags & os.O_CREAT) and (attr is not None):