From: Tony Mack Date: Wed, 13 Sep 2006 15:40:26 +0000 (+0000) Subject: - fixed NodeGroup.delete function X-Git-Tag: pycurl-7_13_1~761 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=5baee21fc719ebc4ca9c3a54378c683d7a0062aa;p=plcapi.git - fixed NodeGroup.delete function --- diff --git a/PLC/NodeGroups.py b/PLC/NodeGroups.py index 1a02200..0e8b233 100644 --- a/PLC/NodeGroups.py +++ b/PLC/NodeGroups.py @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: NodeGroups.py,v 1.4 2006/09/12 16:08:50 tmack Exp $ +# $Id: NodeGroups.py,v 1.5 2006/09/12 18:04:02 tmack Exp $ # from types import StringTypes @@ -161,7 +161,7 @@ class NodeGroup(Row): """ assert 'nodegroup_id' in self - + assert self is not {} # Delete ourself tables = ['nodegroup_nodes', 'override_bootscripts', 'conf_assoc', 'node_root_access'] @@ -174,8 +174,8 @@ class NodeGroup(Row): for table in tables: self.api.db.do("DELETE FROM %s" \ - " WHERE nodegroup_id = %(nodegroup_id)" % \ - table, self) + " WHERE nodegroup_id = %d" % \ + (table, self['nodegroup_id']), self) if commit: self.api.db.commit()