more entries in gitignore for lower noise
[plcapi.git] / PLC / Boot.py
index 5926bbc..0f1bc28 100644 (file)
@@ -4,12 +4,9 @@
 # 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
@@ -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'])