From: Thierry Parmentelat Date: Tue, 27 Mar 2012 10:17:55 +0000 (+0200) Subject: review use of d.quote: use [ ] instead of deprecated map X-Git-Tag: plcapi-5.1-1~12 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=a8f3f895eae7f5f9870380720d1cda979d553915;p=plcapi.git review use of d.quote: use [ ] instead of deprecated map --- diff --git a/PLC/BootStates.py b/PLC/BootStates.py index 416ca4d..d72b07d 100644 --- a/PLC/BootStates.py +++ b/PLC/BootStates.py @@ -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) diff --git a/PLC/KeyTypes.py b/PLC/KeyTypes.py index 1fae01b..1f7fd19 100644 --- a/PLC/KeyTypes.py +++ b/PLC/KeyTypes.py @@ -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) diff --git a/PLC/NetworkMethods.py b/PLC/NetworkMethods.py index 4a68297..ff31fe2 100644 --- a/PLC/NetworkMethods.py +++ b/PLC/NetworkMethods.py @@ -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) diff --git a/PLC/NetworkTypes.py b/PLC/NetworkTypes.py index 7e9187c..8d00b03 100644 --- a/PLC/NetworkTypes.py +++ b/PLC/NetworkTypes.py @@ -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) diff --git a/PLC/NodeTypes.py b/PLC/NodeTypes.py index 896d7eb..eb8eb99 100644 --- a/PLC/NodeTypes.py +++ b/PLC/NodeTypes.py @@ -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) diff --git a/PLC/SliceInstantiations.py b/PLC/SliceInstantiations.py index f03b119..8e93992 100644 --- a/PLC/SliceInstantiations.py +++ b/PLC/SliceInstantiations.py @@ -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)