# Mark Huang <mlhuang@cs.princeton.edu>
# 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
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]
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'])