formatted the 'db' script using vscode
[plcapi.git] / PLC / Methods / DeleteKeyType.py
index 2a25c71..81bbd56 100644 (file)
@@ -22,11 +22,12 @@ class DeleteKeyType(Method):
 
     returns = Parameter(int, '1 if successful')
 
+
     def call(self, auth, name):
         key_types = KeyTypes(self.api, [name])
         if not key_types:
-            raise PLCInvalidArgument, "No such key type"
-        key_type = key_types.values()[0]
+            raise PLCInvalidArgument("No such key type")
+        key_type = key_types[0]
 
         key_type.delete()