提交 41452582 编写于 作者: Y Yancey1989

fix delete_ops

上级 0595f23e
...@@ -854,11 +854,10 @@ class Block(object): ...@@ -854,11 +854,10 @@ class Block(object):
try: try:
start = list(self.ops).index(ops[0]) start = list(self.ops).index(ops[0])
end = list(self.ops).index(ops[-1]) end = list(self.ops).index(ops[-1])
[self.remove_op(start) for _ in xrange(end - start + 1)]
except Exception, e: except Exception, e:
raise e raise e
self.desc.remove_op(start, end + 1)
def slice_ops(self, start, end): def slice_ops(self, start, end):
return self.ops[start:end] return self.ops[start:end]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册