X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FBoot.py;h=001211e09933c4b6bf8eaf79b448a9c3dc747e54;hb=19d4a01ccf66af9e00914351b3eacd5fc880f988;hp=cd3a7389c0240e89040156cb2f6d20f9dc230be1;hpb=c93e31479f4b3da49a06345e65179a9d16165c9b;p=plcapi.git diff --git a/PLC/Boot.py b/PLC/Boot.py index cd3a738..001211e 100644 --- a/PLC/Boot.py +++ b/PLC/Boot.py @@ -4,11 +4,9 @@ # Mark Huang # Copyright (C) 2007 The Trustees of Princeton University # -# $Id$ -# from PLC.Faults import * -from PLC.Debug import log +from PLC.Logger import logger from PLC.Messages import Message, Messages from PLC.Persons import Person, Persons from PLC.Sites import Site, Sites @@ -19,7 +17,7 @@ def notify_owners(method, node, message_id, fault = None): messages = Messages(method.api, [message_id], enabled = True) if not messages: - print >> log, "No such message template '%s'" % message_id + logger.error("No such message template '%s'" % message_id) return 1 message = messages[0] @@ -40,8 +38,8 @@ def notify_owners(method, node, message_id, persons = Persons(method.api, site['person_ids']) for person in persons: - if include_pis and 'pi' in person['roles'] or \ - include_techs and 'tech' in person['roles']: + if (include_pis and 'pi' in person['roles'] and person['enabled']) or \ + (include_techs and 'tech' in person['roles'] and person['enabled']) : To.append(("%s %s" % (person['first_name'], person['last_name']), person['email'])) # Send email