Skip to content

Commit a24c362

Browse files
committed
Log potential error on cloning
1 parent dca1842 commit a24c362

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

gitfs/repository.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,13 @@ def clone(cls, remote_url, path, branch=None, credentials=None):
193193
194194
"""
195195

196-
repo = clone_repository(
197-
remote_url, path, checkout_branch=branch, callbacks=credentials
198-
)
196+
try:
197+
repo = clone_repository(
198+
remote_url, path, checkout_branch=branch, callbacks=credentials
199+
)
200+
except Exception as e:
201+
log.error("Error on cloning the repository: ", exc_info=True)
202+
199203
repo.checkout_head()
200204
return cls(repo)
201205

0 commit comments

Comments
 (0)