Skip to content

Commit

Permalink
Added explicit check for path = None in init_repository
Browse files Browse the repository at this point in the history
Closes libgit2#688.
  • Loading branch information
tmr232 committed Apr 5, 2017
1 parent 453fd8a commit 7ee8512
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pygit2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ def init_repository(path, bare=False,
See libgit2's documentation on git_repository_init_ext for further details.
"""
# Pre-process input parameters
if path is None:
raise TypeError('Expected string type for path, found None.')

if bare:
flags |= GIT_REPOSITORY_INIT_BARE

Expand Down

0 comments on commit 7ee8512

Please sign in to comment.