Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value...
[plcapi.git] / PLC / Methods / DeletePersonFromSite.py
index fcb6ec3..11df6a7 100644 (file)
@@ -1,4 +1,3 @@
-# $Id#
 from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
@@ -31,27 +30,28 @@ class DeletePersonFromSite(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")
         person = persons[0]
 
         if person['peer_id'] is not None:
-            raise PLCInvalidArgument, "Not a local account"
+            raise PLCInvalidArgument("Not a local account")
 
         # Get site information
         sites = Sites(self.api, [site_id_or_login_base])
         if not sites:
-            raise PLCInvalidArgument, "No such site"
+            raise PLCInvalidArgument("No such site")
         site = sites[0]
 
         if site['peer_id'] is not None:
-            raise PLCInvalidArgument, "Not a local site"
+            raise PLCInvalidArgument("Not a local site")
 
         if site['site_id'] in person['site_ids']:
             site.remove_person(person)
 
-       # Logging variables
-       self.event_objects = {'Site': [site['site_id']],
-                             'Person': [person['person_id']]}  
-       self.message = 'Person %d deleted from site %d  ' % \
-               (person['person_id'], site['site_id'])
+        # Logging variables
+        self.event_objects = {'Site': [site['site_id']],
+                              'Person': [person['person_id']]}
+        self.message = 'Person %d deleted from site %d  ' % \
+                        (person['person_id'], site['site_id'])
+
         return 1