bug fix in time-slice

This commit is contained in:
ppwwyyxx
2014-12-22 23:07:36 +08:00
parent f03eb9b5bd
commit 7ee52e32f5
4 changed files with 11 additions and 75 deletions
+5 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: msgslice.py
# Date: Mon Dec 22 22:24:32 2014 +0800
# Date: Mon Dec 22 23:07:02 2014 +0800
# Author: Yuxin Wu <[email protected]>
class MessageSlicer(object):
@@ -25,7 +25,10 @@ class MessageSlicer(object):
continue
ret.append(now)
now = []
now = [m]
ret.append(now)
assert len(msgs) == sum([len(k) for k in ret])
return ret