[kernel] r10598 - people/waldi/dkt/lib/dkt/hooks

Bastian Blank waldi at alioth.debian.org
Tue Feb 19 14:04:54 UTC 2008


Author: waldi
Date: Tue Feb 19 14:04:53 2008
New Revision: 10598

Log:
lib/dkt/hooks/registry.py: Handle interfaces without registered hooks.


Modified:
   people/waldi/dkt/lib/dkt/hooks/registry.py

Modified: people/waldi/dkt/lib/dkt/hooks/registry.py
==============================================================================
--- people/waldi/dkt/lib/dkt/hooks/registry.py	(original)
+++ people/waldi/dkt/lib/dkt/hooks/registry.py	Tue Feb 19 14:04:53 2008
@@ -21,7 +21,10 @@
     def run(self, interface, func, *args, **kw):
         import interfaces
 
-        l = self._interfaces[interface].get()
+        i = self._interfaces.get(interface, None)
+        if i is None:
+            return
+        l = i.get()
 
         if issubclass(interface, interfaces.IHookRunAll):
             def runner(*args, **kw):



More information about the Kernel-svn-changes mailing list