Improve error message for OSError in [p]repo add (#3656)

* Update downloader.py

* Update downloader.py
This commit is contained in:
jack1142 2020-03-20 20:40:59 +01:00 committed by GitHub
parent 0f364a6d13
commit 5074f2dbab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -506,7 +506,12 @@ class Downloader(commands.Cog):
except errors.ExistingGitRepo: except errors.ExistingGitRepo:
await ctx.send(_("That git repo has already been added under another name.")) await ctx.send(_("That git repo has already been added under another name."))
except errors.CloningError as err: except errors.CloningError as err:
await ctx.send(_("Something went wrong during the cloning process.")) await ctx.send(
_(
"Something went wrong during the cloning process."
" See logs for more information."
)
)
log.exception( log.exception(
"Something went wrong whilst cloning %s (to revision: %s)", "Something went wrong whilst cloning %s (to revision: %s)",
repo_url, repo_url,
@ -520,7 +525,7 @@ class Downloader(commands.Cog):
await ctx.send( await ctx.send(
_( _(
"Something went wrong trying to add that repo." "Something went wrong trying to add that repo."
" Your repo name might have an invalid character." " See logs for more information."
) )
) )
else: else: