git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
68be08d
)
review use of d.quote: use [ ] instead of deprecated map
author
Thierry Parmentelat
<thierry.parmentelat@sophia.inria.fr>
Tue, 27 Mar 2012 10:17:55 +0000
(12:17 +0200)
committer
Thierry Parmentelat
<thierry.parmentelat@sophia.inria.fr>
Tue, 27 Mar 2012 10:17:55 +0000
(12:17 +0200)
PLC/BootStates.py
patch
|
blob
|
history
PLC/KeyTypes.py
patch
|
blob
|
history
PLC/NetworkMethods.py
patch
|
blob
|
history
PLC/NetworkTypes.py
patch
|
blob
|
history
PLC/NodeTypes.py
patch
|
blob
|
history
PLC/SliceInstantiations.py
patch
|
blob
|
history
diff --git
a/PLC/BootStates.py
b/PLC/BootStates.py
index
416ca4d
..
d72b07d
100644
(file)
--- a/
PLC/BootStates.py
+++ b/
PLC/BootStates.py
@@
-49,6
+49,6
@@
class BootStates(Table):
", ".join(BootState.fields)
if boot_states:
", ".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)
self.selectall(sql)
diff --git
a/PLC/KeyTypes.py
b/PLC/KeyTypes.py
index
1fae01b
..
1f7fd19
100644
(file)
--- a/
PLC/KeyTypes.py
+++ b/
PLC/KeyTypes.py
@@
-49,6
+49,6
@@
class KeyTypes(Table):
", ".join(KeyType.fields)
if key_types:
", ".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)
self.selectall(sql)
diff --git
a/PLC/NetworkMethods.py
b/PLC/NetworkMethods.py
index
4a68297
..
ff31fe2
100644
(file)
--- a/
PLC/NetworkMethods.py
+++ b/
PLC/NetworkMethods.py
@@
-49,6
+49,6
@@
class NetworkMethods(Table):
", ".join(NetworkMethod.fields)
if methods:
", ".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)
self.selectall(sql)
diff --git
a/PLC/NetworkTypes.py
b/PLC/NetworkTypes.py
index
7e9187c
..
8d00b03
100644
(file)
--- a/
PLC/NetworkTypes.py
+++ b/
PLC/NetworkTypes.py
@@
-49,6
+49,6
@@
class NetworkTypes(Table):
", ".join(NetworkType.fields)
if types:
", ".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)
self.selectall(sql)
diff --git
a/PLC/NodeTypes.py
b/PLC/NodeTypes.py
index
896d7eb
..
eb8eb99
100644
(file)
--- a/
PLC/NodeTypes.py
+++ b/
PLC/NodeTypes.py
@@
-46,6
+46,6
@@
class NodeTypes(Table):
", ".join(NodeType.fields)
if node_types:
", ".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)
self.selectall(sql)
diff --git
a/PLC/SliceInstantiations.py
b/PLC/SliceInstantiations.py
index
f03b119
..
8e93992
100644
(file)
--- a/
PLC/SliceInstantiations.py
+++ b/
PLC/SliceInstantiations.py
@@
-49,6
+49,6
@@
class SliceInstantiations(Table):
", ".join(SliceInstantiation.fields)
if instantiations:
", ".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)
self.selectall(sql)