diff --git a/product/ERP5/Document/Alarm.py b/product/ERP5/Document/Alarm.py
index 73e0b30b6794b33177a2a65f4f7d3fa070fd84f2..be5fcf8bbd7066b44a23e0a7da4d4628666a25e3 100644
--- a/product/ERP5/Document/Alarm.py
+++ b/product/ERP5/Document/Alarm.py
@@ -143,8 +143,8 @@ class Alarm(XMLObject, PeriodicityMixin):
         except AttributeError:
           # XXX guess presence of *args and **kw
           name_list = func_code.co_varnames[func_code.co_argcount:]
-          has_args = int(name_list and name_list[0] == 'args')
-          has_kw = int(len(name_list) > has_args and
+          has_args = bool(name_list and name_list[0] == 'args')
+          has_kw = bool(len(name_list) > has_args and
                        name_list[has_args] == 'kw')
         name_list = func_code.co_varnames[:func_code.co_argcount]
         if 'params' in name_list or has_kw: