allow tuples and sets as sequence filters
[plcapi.git] / PLC / NodeGroups.py
index 34d73b0..550d0bd 100644 (file)
@@ -4,7 +4,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: NodeGroups.py,v 1.16 2006/11/02 18:32:55 mlhuang Exp $
+# $Id: NodeGroups.py,v 1.17 2006/11/08 22:59:15 mlhuang Exp $
 #
 
 from types import StringTypes
@@ -111,7 +111,7 @@ class NodeGroups(Table):
               ", ".join(NodeGroup.fields)
 
         if nodegroup_filter is not None:
-            if isinstance(nodegroup_filter, list):
+            if isinstance(nodegroup_filter, (list, tuple, set)):
                 # Separate the list into integers and strings
                 ints = filter(lambda x: isinstance(x, (int, long)), nodegroup_filter)
                 strs = filter(lambda x: isinstance(x, StringTypes), nodegroup_filter)