You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2018/11/14 19:43:05 UTC

allura git commit: [#8264] catch AssertionError too, which can happen on an empty foo.lock file

Repository: allura
Updated Branches:
  refs/heads/db/8264 [created] 6a3eac3fc


[#8264] catch AssertionError too, which can happen on an empty foo.lock file


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/6a3eac3f
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/6a3eac3f
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/6a3eac3f

Branch: refs/heads/db/8264
Commit: 6a3eac3fc667dad5f5601fdd7ed242e5b0465412
Parents: 8f520ef
Author: Dave Brondsema <da...@brondsema.net>
Authored: Wed Nov 14 14:42:59 2018 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Nov 14 14:42:59 2018 -0500

----------------------------------------------------------------------
 ForgeGit/forgegit/model/git_repo.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/6a3eac3f/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index a2d55db..f75e21f 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -564,8 +564,8 @@ class GitImplementation(M.RepositoryImplementation):
         for ref in ref_list:
             try:
                 hex_sha = ref.commit.hexsha
-            except ValueError:
-                log.debug(u"Found invalid sha: {}".format(ref))
+            except (ValueError, AssertionError) as e:
+                log.debug(u"Found invalid sha: {}".format(ref), exc_info=e)
                 continue
             refs.append(Object(name=ref.name, object_id=hex_sha))
         time_taken = time() - start_time