remove PLC.Debug.log, use PLC.Logger.logger instead
[plcapi.git] / PLC / Methods / ResetPassword.py
index d0b70c2..8e9da53 100644 (file)
@@ -1,4 +1,3 @@
-# $Id#
 import random
 import base64
 import time
@@ -6,7 +5,7 @@ import urllib
 
 from types import StringTypes
 
-from PLC.Debug import log
+from PLC.Logger import logger
 from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
@@ -36,14 +35,14 @@ class ResetPassword(Method):
         Auth(),
         Mixed(Person.fields['person_id'],
               Person.fields['email']),
-       Person.fields['verification_key'],
+        Person.fields['verification_key'],
         Person.fields['verification_expires']
         ]
 
     returns = Parameter(int, '1 if verification_key is valid')
 
     def call(self, auth, person_id_or_email, verification_key = None, verification_expires = None):
-       # Get account information
+        # Get account information
         # we need to search in local objects only
         if isinstance (person_id_or_email,StringTypes):
             filter={'email':person_id_or_email}
@@ -120,9 +119,9 @@ class ResetPassword(Method):
                      Subject = message['subject'] % params,
                      Body = message['template'] % params)
         else:
-            print >> log, "Warning: No message template '%s'" % message_id
+            logger.warning("No message template '%s'" % message_id)
 
-       # Logging variables
+        # Logging variables
         self.event_objects = {'Person': [person['person_id']]}
         self.message = message_id