Current state:
216: f.save(branch='master', commit_message='Update testfile')
230: f.save(branch='master', commit_message='Update testfile', encoding='base64')
both of them fail, reporting that branch name is not defined.
For me worked this:
216: f.save(branch_name='master', commit_message='Update testfile')
230: f.save(branch_name='master', commit_message='Update testfile', encoding='base64')
As for the rest - thanks for the job, that you've done :)