git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
formatted the 'db' script using vscode
[plcapi.git]
/
PLC
/
Methods
/
DeletePCU.py
diff --git
a/PLC/Methods/DeletePCU.py
b/PLC/Methods/DeletePCU.py
index
caff26b
..
a420403
100644
(file)
--- a/
PLC/Methods/DeletePCU.py
+++ b/
PLC/Methods/DeletePCU.py
@@
-1,5
+1,3
@@
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
@@
-29,12
+27,12
@@
class DeletePCU(Method):
# Get associated PCU details
pcus = PCUs(self.api, [pcu_id])
if not pcus:
# Get associated PCU details
pcus = PCUs(self.api, [pcu_id])
if not pcus:
- raise PLCInvalidArgument
, "No such PCU"
+ raise PLCInvalidArgument
("No such PCU")
pcu = pcus[0]
if 'admin' not in self.caller['roles']:
if pcu['site_id'] not in self.caller['site_ids']:
pcu = pcus[0]
if 'admin' not in self.caller['roles']:
if pcu['site_id'] not in self.caller['site_ids']:
- raise PLCPermissionDenied
, "Not allowed to update that PCU"
+ raise PLCPermissionDenied
("Not allowed to update that PCU")
pcu.delete()
pcu.delete()