X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FBoot.py;h=0f1bc28df59f9744c85b393f257dbdf8f6001126;hb=afaa86e866019b80eb3524706fc19837047c2e49;hp=5926bbc5181045155b3cb8f559e4342e2a199227;hpb=f5cd72e35593c96b9996ab4e49674cccc7525c48;p=plcapi.git diff --git a/PLC/Boot.py b/PLC/Boot.py index 5926bbc..0f1bc28 100644 --- a/PLC/Boot.py +++ b/PLC/Boot.py @@ -4,12 +4,9 @@ # Mark Huang # Copyright (C) 2007 The Trustees of Princeton University # -# $Id$ -# $URL$ -# 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 @@ -20,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] @@ -36,7 +33,7 @@ def notify_owners(method, node, message_id, if include_pis or include_techs: sites = Sites(method.api, [node['site_id']]) if not sites: - raise PLCAPIError, "No site associated with node" + raise PLCAPIError("No site associated with node") site = sites[0] persons = Persons(method.api, site['person_ids'])