review use of d.quote: use [ ] instead of deprecated map
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 27 Mar 2012 10:17:55 +0000 (12:17 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 27 Mar 2012 10:17:55 +0000 (12:17 +0200)
PLC/BootStates.py
PLC/KeyTypes.py
PLC/NetworkMethods.py
PLC/NetworkTypes.py
PLC/NodeTypes.py
PLC/SliceInstantiations.py

index 416ca4d..d72b07d 100644 (file)
@@ -49,6 +49,6 @@ class BootStates(Table):
               ", ".join(BootState.fields)
 
         if boot_states:
-            sql += " WHERE boot_state IN (%s)" % ", ".join(map(api.db.quote, boot_states))
+            sql += " WHERE boot_state IN (%s)" % ", ".join( [ api.db.quote (s) for s in boot_states ] )
 
         self.selectall(sql)
index 1fae01b..1f7fd19 100644 (file)
@@ -49,6 +49,6 @@ class KeyTypes(Table):
               ", ".join(KeyType.fields)
 
         if key_types:
-            sql += " WHERE key_type IN (%s)" % ", ".join(map(api.db.quote, key_types))
+            sql += " WHERE key_type IN (%s)" % ", ".join( [ api.db.quote (t) for t in key_types ] )
 
         self.selectall(sql)
index 4a68297..ff31fe2 100644 (file)
@@ -49,6 +49,6 @@ class NetworkMethods(Table):
               ", ".join(NetworkMethod.fields)
 
         if methods:
-            sql += " WHERE method IN (%s)" % ", ".join(map(api.db.quote, methods))
+            sql += " WHERE method IN (%s)" % ", ".join( [ api.db.quote (m) for m in methods ] )
 
         self.selectall(sql)
index 7e9187c..8d00b03 100644 (file)
@@ -49,6 +49,6 @@ class NetworkTypes(Table):
               ", ".join(NetworkType.fields)
 
         if types:
-            sql += " WHERE type IN (%s)" % ", ".join(map(api.db.quote, types))
+            sql += " WHERE type IN (%s)" % ", ".join( [ api.db.quote (t) for t in types ] )
 
         self.selectall(sql)
index 896d7eb..eb8eb99 100644 (file)
@@ -46,6 +46,6 @@ class NodeTypes(Table):
               ", ".join(NodeType.fields)
 
         if node_types:
-            sql += " WHERE node_type IN (%s)" % ", ".join(map(api.db.quote, node_types))
+            sql += " WHERE node_type IN (%s)" % ", ".join( [ api.db.quote (t) for t in node_types ] )
 
         self.selectall(sql)
index f03b119..8e93992 100644 (file)
@@ -49,6 +49,6 @@ class SliceInstantiations(Table):
               ", ".join(SliceInstantiation.fields)
 
         if instantiations:
-            sql += " WHERE instantiation IN (%s)" % ", ".join(map(api.db.quote, instantiations))
+            sql += " WHERE instantiation IN (%s)" % ", ".join( [ api.db.quote (i) for i in instantiations ] )
 
         self.selectall(sql)