From 28bde8451736b04a8d45edc179a0a8aac021e2db Mon Sep 17 00:00:00 2001 From: wuzewu Date: Mon, 26 Oct 2020 19:05:19 +0800 Subject: [PATCH] Log errors when checkout branches fail --- paddlehub/server/git_source.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/paddlehub/server/git_source.py b/paddlehub/server/git_source.py index a41c3c5f..bc416647 100644 --- a/paddlehub/server/git_source.py +++ b/paddlehub/server/git_source.py @@ -61,7 +61,11 @@ class GitSource(object): # reload modules self.load_hub_modules() except: - log.logger.warning('An error occurred while checkout {}'.format(self.path)) + msg = traceback.format_exc() + file = utils.record(msg) + log.logger.warning( + 'An error occurred while checkout {}. Detailed error information can be found in the {}.'.format( + self.path, file)) def update(self): try: -- GitLab