get rid of svn keywords once and for good
[plcapi.git] / PLC / Methods / DeletePCU.py
index 4b50a3f..fe59abc 100644 (file)
@@ -22,9 +22,10 @@ class DeletePCU(Method):
 
     returns = Parameter(int, '1 if successful')
 
+
     def call(self, auth, pcu_id):
         # Get associated PCU details
-        pcus = PCUs(self.api, [pcu_id]).values()
+        pcus = PCUs(self.api, [pcu_id])
         if not pcus:
             raise PLCInvalidArgument, "No such PCU"
         pcu = pcus[0]
@@ -35,4 +36,8 @@ class DeletePCU(Method):
 
         pcu.delete()
 
+        # Logging variables
+        self.event_objects = {'PCU': [pcu['pcu_id']]}
+        self.message = 'PCU %d deleted' % pcu['pcu_id']
+
         return 1