summaryrefslogtreecommitdiff
path: root/git/repo/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/repo/base.py')
-rw-r--r--git/repo/base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/git/repo/base.py b/git/repo/base.py
index f8d670c4..023582b5 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -36,6 +36,11 @@ from .fun import rev_parse, is_git_dir, find_submodule_git_dir, touch, find_work
import gc
import gitdb
+try:
+ import pathlib
+except ImportError:
+ pathlib = None
+
log = logging.getLogger(__name__)
@@ -116,6 +121,8 @@ class Repo(object):
epath = decygpath(epath)
epath = epath or path or os.getcwd()
+ if not isinstance(epath, str):
+ epath = str(epath)
if expand_vars and ("%" in epath or "$" in epath):
warnings.warn("The use of environment variables in paths is deprecated" +
"\nfor security reasons and may be removed in the future!!")