Skip to content

Comments

Fix TypeError on suppress_veth plugin#2

Open
hana-da wants to merge 1 commit intoiij:masterfrom
hana-da:fix-type_error-on-suppress_veth-plugin
Open

Fix TypeError on suppress_veth plugin#2
hana-da wants to merge 1 commit intoiij:masterfrom
hana-da:fix-type_error-on-suppress_veth-plugin

Conversation

@hana-da
Copy link
Contributor

@hana-da hana-da commented Oct 25, 2022

TypeError is raised when record['ifInOctets'] or record['ifOutOctets'] is nil .

So, I used the to_i method instead of the Integer() method.
Because nil.to_i does not raise an exception and just returns 0.

I have been using it with this patch for over 2 years and have had no problems.

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.

1 participant