From 8bb765a2dacfac73e98d09191e1decb2bdbe2584 Mon Sep 17 00:00:00 2001 From: Enix Yu Date: Mon, 27 Jun 2016 10:04:17 +0800 Subject: [PATCH] fix update/create/delete file api return value issue --- github/Repository.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/github/Repository.py b/github/Repository.py index e0440bca..814982bc 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -1270,8 +1270,8 @@ class Repository(github.GithubObject.CompletableGithubObject): input=put_parameters ) - return {'content': github.ContentFile.ContentFile(self._requester, headers, data['content'], completed=True), - 'commit': github.Commit.Commit(self._requester, headers, data['commit'], completed=True)} + return {'content': github.ContentFile.ContentFile(self._requester, headers, data, completed=True), + 'commit': github.Commit.Commit(self._requester, headers, data, completed=True)} def update_file(self, path, message, content, sha, branch=github.GithubObject.NotSet, @@ -1327,8 +1327,8 @@ class Repository(github.GithubObject.CompletableGithubObject): input=put_parameters ) - return {'commit': github.Commit.Commit(self._requester, headers, data['commit'], completed=True), - 'content': github.ContentFile.ContentFile(self._requester, headers, data['content'], completed=True)} + return {'commit': github.Commit.Commit(self._requester, headers, data, completed=True), + 'content': github.ContentFile.ContentFile(self._requester, headers, data, completed=True)} def delete_file(self, path, message, sha, branch=github.GithubObject.NotSet): @@ -1362,7 +1362,7 @@ class Repository(github.GithubObject.CompletableGithubObject): input=url_parameters ) - return {'commit': github.Commit.Commit(self._requester, headers, data['commit'], completed=True), + return {'commit': github.Commit.Commit(self._requester, headers, data, completed=True), 'content': github.GithubObject.NotSet} def get_dir_contents(self, path, ref=github.GithubObject.NotSet):