Skip to content

fix last line is incomplete#111

Open
zlpqingmei wants to merge 1 commit intosmartbgp:masterfrom
zlpqingmei:master
Open

fix last line is incomplete#111
zlpqingmei wants to merge 1 commit intosmartbgp:masterfrom
zlpqingmei:master

Conversation

@zlpqingmei
Copy link
Contributor

No description provided.

@zlpqingmei zlpqingmei requested a review from meidli January 9, 2020 07:48
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 56.718% when pulling 4db6e9d on zlpqingmei:master into 203e7f0 on smartbgp:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 56.718% when pulling 4db6e9d on zlpqingmei:master into 203e7f0 on smartbgp:master.

Copy link
Member

@xiaopeng163 xiaopeng163 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOG.error(last)
if break_flag:
break
offset *= 2
Copy link
Member

@xiaopeng163 xiaopeng163 Jan 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, you use try-except to get the last real seq(if last line is complete) or the seq before last line(if last line is incomplete) as last seq.

how about if catch an exception, and we know exactly that exception is caused by last line incomplete, we return the last seq as last seq + 1.

{seq: 2}
{se.....}  # incomplete

and we return last seq = 3, because the next line should be started from seq =4

how do you think @meidli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants