/etc/plc.d/db dump-and-clean
[plcapi.git] / PLC / Boot.py
index 52a9fd9..0f1bc28 100644 (file)
@@ -6,7 +6,7 @@
 #
 
 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
@@ -17,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]
 
@@ -33,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'])