svn keywords
[plcapi.git] / PLC / Methods / VerifyPerson.py
index 3f1591a..9aae067 100644 (file)
@@ -1,3 +1,5 @@
+# $Id$
+# $URL$
 import random
 import base64
 import time
@@ -46,14 +48,14 @@ class VerifyPerson(Method):
        # Get account information
         persons = Persons(self.api, [person_id_or_email])
         if not persons:
-            raise PLCInvalidArgument, "No such account"
+            raise PLCInvalidArgument, "No such account %r"%person_id_or_email
         person = persons[0]
 
         if person['peer_id'] is not None:
-            raise PLCInvalidArgument, "Not a local account"
+            raise PLCInvalidArgument, "Not a local account %r"%person_id_or_email
 
         if person['enabled']:
-            raise PLCInvalidArgument, "Account must be new (disabled)"
+            raise PLCInvalidArgument, "Account %r must be new (disabled)"%person_id_or_email
 
         # Get the primary site name
         person_sites = Sites(self.api, person['site_ids'])
@@ -146,7 +148,7 @@ class VerifyPerson(Method):
             print >> log, "Warning: No message template '%s'" % message_id
 
        # Logging variables
-        self.object_ids = [person['person_id']]
+        self.event_objects = {'Person': [person['person_id']]}
         self.message = message_id
        
        if verification_key is not None and person['verification_expires'] and \