github3.py library updated so we can use it now

This commit is contained in:
Ryan Pitts 2015-10-30 12:29:39 -07:00
Родитель ba278ccbb8
Коммит 16d9921193
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -1,7 +1,7 @@
cffi==1.3.0
cryptography==1.0.2
enum34==1.0.4
-e git+https://github.com/ryanpitts/github3.py.git@74c4c5338606a89b794a1052046969995fa83336#egg=github3.py-origin/develop
github3.py==0.9.4
gspread==0.2.5
httplib2==0.9.2
idna==2.0

Просмотреть файл

@ -296,7 +296,7 @@ def commit_json(data, target_config=GITHUB_CONFIG, commit=COMMIT_JSON_TO_GITHUB)
repo = gh.repository(target_config['REPO_OWNER'], target_config['REPO_NAME'])
# check to see whether data file exists
contents = repo.file_contents(
contents = repo.contents(
path=target_config['TARGET_FILE'],
ref=target_config['TARGET_BRANCH']
)
@ -312,9 +312,11 @@ def commit_json(data, target_config=GITHUB_CONFIG, commit=COMMIT_JSON_TO_GITHUB)
)
else:
# update existing file
contents.update(
repo.update_file(
path=target_config['TARGET_FILE'],
message='updating session data',
content=data,
sha=contents.sha,
branch=GITHUB_CONFIG['TARGET_BRANCH']
)