Repository: libcloud Updated Branches: refs/heads/trunk 88170f658 -> 67a993fd9
fix oops introduced in last commit Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/67a993fd Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/67a993fd Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/67a993fd Branch: refs/heads/trunk Commit: 67a993fd90a5485e62c62e3ae926fc1bff069d20 Parents: 88170f6 Author: Eric Johnson <erjoh...@google.com> Authored: Sat Dec 19 22:50:24 2015 +0000 Committer: Eric Johnson <erjoh...@google.com> Committed: Sat Dec 19 22:50:24 2015 +0000 ---------------------------------------------------------------------- libcloud/common/google.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/67a993fd/libcloud/common/google.py ---------------------------------------------------------------------- diff --git a/libcloud/common/google.py b/libcloud/common/google.py index bfc8f9b..725a91b 100644 --- a/libcloud/common/google.py +++ b/libcloud/common/google.py @@ -826,5 +826,6 @@ class GoogleBaseConnection(ConnectionUserAndKey, PollingConnection): """ filename = os.path.realpath(os.path.expanduser(self.credential_file)) data = json.dumps(self.oauth2_token) - f = os.open(filename, os.O_CREAT | os.O_WRONLY, 0600) - os.write(f, data) + with os.fdopen(os.open(filename, os.O_CREAT | os.O_WRONLY, + int('600', 8)), 'w') as f: + f.write(data)