]> git.proxmox.com Git - mirror_ovs.git/commitdiff
ovs-tcpundump: fix a conversion issue
authorAaron Conole <aconole@redhat.com>
Fri, 12 Jan 2018 20:40:21 +0000 (15:40 -0500)
committerBen Pfaff <blp@ovn.org>
Fri, 12 Jan 2018 21:07:28 +0000 (13:07 -0800)
When I tried using ovs-tcpundump, I got the following error message:
Traceback (most recent call last):
  File ./ovs-tcpundump, line 64, in <module>
    if m is None or int(m.group(1)) == 0:
ValueError: invalid literal for int() with base 10: '00a0'

Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
utilities/ovs-tcpundump.in

index 57300cdc12a0d63d3ded5e0e01a839f0e64212de..c99015b5bb01c771a308ebaba7739790a02cfe7f 100755 (executable)
@@ -61,7 +61,7 @@ if __name__ == "__main__":
             break
 
         m = regex.match(line)
-        if m is None or int(m.group(1)) == 0:
+        if m is None or int(m.group(1), 16) == 0:
             if packet != '':
                 print packet
             packet = ''