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 2015/08/24 21:26:37 UTC
allura git commit: [#7964] don't try to save tag cache if there's no
ming session (e.g. test code outsidef of a functional web request)
Repository: allura
Updated Branches:
refs/heads/db/7964 [created] 5061738dd
[#7964] don't try to save tag cache if there's no ming session (e.g. test code outsidef of a functional web request)
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/5061738d
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/5061738d
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/5061738d
Branch: refs/heads/db/7964
Commit: 5061738ddd04d0b9bd1262aea5f8429680a4ef31
Parents: 79d3e27
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon Aug 24 18:57:12 2015 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Mon Aug 24 18:57:12 2015 +0000
----------------------------------------------------------------------
ForgeGit/forgegit/model/git_repo.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/5061738d/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index 4c6cfa9..51d300e 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -571,7 +571,9 @@ class GitImplementation(M.RepositoryImplementation):
if threshold is not None and time_taken > threshold:
setattr(self._repo, cache_name, refs)
- session(self._repo).flush(self._repo)
+ sess = session(self._repo)
+ if sess:
+ sess.flush(self._repo)
return refs