allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [5/42] git commit: [#4691] Don't expunge None
Date Tue, 05 Feb 2013 20:23:35 GMT
[#4691] Don't expunge None


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

Branch: refs/heads/master
Commit: 604e978640dd4c5201af80941727e453398bb821
Parents: 2f32ed1
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Mon Dec 10 15:12:27 2012 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Feb 5 20:22:50 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/repo.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/604e9786/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index c89be56..bd6acfc 100644
--- a/Allura/allura/model/repo.py
+++ b/Allura/allura/model/repo.py
@@ -886,7 +886,8 @@ class ModelCache(object):
         elif len(self._cache[cls]) >= self.max_size:
             # remove the least-recently-used cache item
             key, instance = self._cache[cls].popitem(last=False)
-            session(instance).expunge(instance)
+            if instance and session(instance):
+                session(instance).expunge(instance)
 
     def size(self):
         return sum([len(c) for c in self._cache.values()])


Mime
View raw message