From 871e06fde91249d07b1fc90c076f2fcb5b34ade0 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Wed, 8 Oct 2008 16:19:07 +0000
Subject: [PATCH] Woops, unrestrictedTraverse emits a KeyError when object is
 not found, not an AttributeError...

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24108 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/CMFActivity/ActivityTool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/product/CMFActivity/ActivityTool.py b/product/CMFActivity/ActivityTool.py
index aa7f0fd843..f43b282571 100644
--- a/product/CMFActivity/ActivityTool.py
+++ b/product/CMFActivity/ActivityTool.py
@@ -253,7 +253,7 @@ class Message:
             # XXX: There is no check to see if user is allowed to access
             # that method !
             method = obj.unrestrictedTraverse(self.method_id)
-          except AttributeError:
+          except KeyError:
             method = None
             self.setExecutionState(MESSAGE_NOT_EXECUTABLE, context=activity_tool)
           else:
-- 
2.30.9