Fix repository crash if path passed is not a str by thomwiggers · Pull Request #593 · libgit2/pygit2 · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pygit2/repository.py
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

# Python 2 support
# See https://github.com/libgit2/pygit2/pull/180 for a discussion about this.
# Using six isn't an option here yet, we don't necessarily have six installed
if sys.version_info[0] == 2:
u = lambda s: unicode(s, 'utf-8')
else:
Expand Down Expand Up @@ -186,7 +187,7 @@ def run(self):
if cffi_major_version == 0:
extra_args['ext_modules'].append(ffi.verifier.get_extension())
else:
extra_args['cffi_modules']=['pygit2/_run.py:ffi']
extra_args['cffi_modules'] = ['pygit2/_run.py:ffi']


setup(name='pygit2',
Expand All @@ -202,7 +203,7 @@ def run(self):
packages=['pygit2'],
package_data={'pygit2': ['decl.h']},
setup_requires=['cffi'],
install_requires=['cffi'],
install_requires=['cffi', 'six'],
zip_safe=False,
cmdclass=cmdclass,
**extra_args)
9 changes: 8 additions & 1 deletion test/test_repository.py