Commit 169cbd6b authored by Grégory Wisniewski's avatar Grégory Wisniewski

Append a space after an operator. Found by pylint.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@946 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 5275759c
......@@ -118,7 +118,8 @@ class StorageServiceHandler(BaseServiceHandler):
if xcell.getNode().getUUID() == node.getUUID() and \
xcell.getState() not in (OUT_OF_DATE_STATE, UP_TO_DATE_STATE):
msg = "node %s telling that it is UP TO DATE for offset \
%s but where %s for that offset" %(dump(node.getUUID()), offset, xcell.getState())
%s but where %s for that offset" % (dump(node.getUUID()), offset,
xcell.getState())
logging.warning(msg)
self.handleError(conn, packet, INTERNAL_ERROR_CODE, msg)
return
......
......@@ -55,9 +55,9 @@ class CommandEventHandler(EventHandler):
data = "No partition"
else:
for offset, cell_list in row_list:
data += "\n%s | " %offset
data += "\n%s | " % offset
for uuid, state in cell_list:
data += "%s - %s |" %(dump(uuid), state)
data += "%s - %s |" % (dump(uuid), state)
self.app.result = data
def handleAnswerNodeList(self, conn, packet, node_list):
......@@ -73,7 +73,7 @@ class CommandEventHandler(EventHandler):
self.app.result = data
def handleAnswerNodeState(self, conn, packet, uuid, state):
self.app.result = "Node %s set to state %s" %(dump(uuid), state)
self.app.result = "Node %s set to state %s" % (dump(uuid), state)
def handleAnswerClusterState(self, conn, packet, state):
self.app.result = "Cluster state : %s" % state
......
......@@ -505,10 +505,9 @@ class MySQLDatabaseManager(DatabaseManager):
def getOIDList(self, offset, length, num_partitions, partition_list):
q = self.query
r = q("""SELECT DISTINCT oid FROM obj WHERE MOD(oid,%d) in (%s)
r = q("""SELECT DISTINCT oid FROM obj WHERE MOD(oid, %d) in (%s)
ORDER BY oid DESC LIMIT %d,%d""" \
% (num_partitions,
','.join([str(p) for p in partition_list]),
% (num_partitions, ','.join([str(p) for p in partition_list]),
offset, length))
return [p64(t[0]) for t in r]
......@@ -516,7 +515,7 @@ class MySQLDatabaseManager(DatabaseManager):
q = self.query
oid = u64(oid)
r = q("""SELECT serial, LENGTH(value) FROM obj WHERE oid = %d
ORDER BY serial DESC LIMIT %d,%d""" \
ORDER BY serial DESC LIMIT %d, %d""" \
% (oid, offset, length))
if r:
return [(p64(serial), length) for serial, length in r]
......@@ -524,7 +523,7 @@ class MySQLDatabaseManager(DatabaseManager):
def getTIDList(self, offset, length, num_partitions, partition_list):
q = self.query
r = q("""SELECT tid FROM trans WHERE MOD(tid,%d) in (%s)
r = q("""SELECT tid FROM trans WHERE MOD(tid, %d) in (%s)
ORDER BY tid DESC LIMIT %d,%d""" \
% (num_partitions,
','.join([str(p) for p in partition_list]),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment