allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject allura git commit: [#8264] catch AssertionError too, which can happen on an empty foo.lock file
Date Wed, 14 Nov 2018 23:46:56 GMT
Repository: allura
Updated Branches:
  refs/heads/master 8f520ef6d -> 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/master
Commit: 6a3eac3fc667dad5f5601fdd7ed242e5b0465412
Parents: 8f520ef
Author: Dave Brondsema <dave@brondsema.net>
Authored: Wed Nov 14 14:42:59 2018 -0500
Committer: Dave Brondsema <dave@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


Mime
View raw message