Commit bbf16947 authored by Julien Muchembled's avatar Julien Muchembled

storage: fix TypeError while stopping backup

This fixes the following error:

PACKET #0x0012 AnswerTruncate                 > M1 (127.0.0.3:1)
ERROR  Pre-mortem data:
ERROR  Traceback (most recent call last):
ERROR    File "neo/storage/app.py", line 166, in run
ERROR      self._run()
ERROR    File "neo/storage/app.py", line 207, in _run
ERROR      self.doOperation()
ERROR    File "neo/storage/app.py", line 308, in doOperation
ERROR      task_queue[-1].next()
ERROR    File "neo/storage/handlers/storage.py", line 240, in push
ERROR      conn.notify(Packets.AddObject(oid, serial, *object[2:]))
ERROR  TypeError: 'bool' object is unsubscriptable
parent 35787987
...@@ -233,9 +233,9 @@ class StorageOperationHandler(EventHandler): ...@@ -233,9 +233,9 @@ class StorageOperationHandler(EventHandler):
del object_dict[serial] del object_dict[serial]
continue continue
object = dm.getObject(oid, serial) object = dm.getObject(oid, serial)
if object is None: if not object:
conn.answer(Errors.ReplicationError( conn.answer(Errors.ReplicationError(
"partition %u dropped" % partition)) "partition %u dropped or truncated" % partition))
return return
conn.notify(Packets.AddObject(oid, serial, *object[2:])) conn.notify(Packets.AddObject(oid, serial, *object[2:]))
yield yield
......
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