Title: [commits] (vajda) [15299] - fixed bug 10781 (r=grant)
Revision
15299
Author
vajda
Date
2007-09-05 10:24:41 -0700 (Wed, 05 Sep 2007)

Log Message

- fixed bug 10781 (r=grant)
(http://bugzilla.osafoundation.org/show_bug.cgi?id=10781)
(async notifs may break)

Modified Paths

Diff

Modified: trunk/chandler/repository/persistence/RepositoryView.py (15298 => 15299)

--- trunk/chandler/repository/persistence/RepositoryView.py	2007-09-05 17:16:01 UTC (rev 15298)
+++ trunk/chandler/repository/persistence/RepositoryView.py	2007-09-05 17:24:41 UTC (rev 15299)
@@ -1876,9 +1876,13 @@
         
     def __call__(self, op, change, owner, name, other, dirties):
 
-        getattr(self.view[self.watchingItem],
-                self.methodName)(op, owner, name, other, dirties)
+        try:
+            watchingItem = self.view[self.watchingItem]
+        except KeyError:
+            return
 
+        getattr(watchingItem, self.methodName)(op, owner, name, other, dirties)
+
     def compare(self, methodName):
 
         return self.methodName == methodName
@@ -1893,13 +1897,16 @@
         
     def __call__(self, op, change, owner, name, other, dirties):
 
-        if isuuid(owner):
-            kind = self.view[owner].kind
-        else:
-            kind = owner.kind
+        try:
+            watchingItem = self.view[self.watchingItem]
+            if isuuid(owner):
+                kind = self.view[owner].kind
+            else:
+                kind = owner.kind
+        except KeyError:
+            return
 
-        getattr(self.view[self.watchingItem],
-                self.methodName)(op, kind, other, dirties)
+        getattr(watchingItem, self.methodName)(op, kind, other, dirties)
 
     def compare(self, methodName):
 
@@ -1915,9 +1922,13 @@
         
     def __call__(self, op, uItem, dirties):
 
-        getattr(self.view[self.watchingItem],
-                self.methodName)(op, uItem, dirties)
+        try:
+            watchingItem = self.view[self.watchingItem]
+        except KeyError:
+            return
 
+        getattr(watchingItem, self.methodName)(op, uItem, dirties)
+
     def compare(self, methodName):
 
         return self.methodName == methodName




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to