Skip to content

ValueError: invalid literal for int() with base 10: '10000.0' #88

Open
@maurerle

Description

Casting the string directly to an int fails using BATMAN_V when i set up routing between two supernodes:

Feb 18 17:45:30 respondd.py[770]: Traceback (most recent call last):
Feb 18 17:45:30 respondd.py[770]:   File "/opt/mesh-announce/providers/__init__.py", line 153, in call
Feb 18 17:45:30 respondd.py[770]:     _set_value(ret, source.path, source.call(env))
Feb 18 17:45:30 respondd.py[770]:   File "/opt/mesh-announce/providers/__init__.py", line 118, in call
Feb 18 17:45:30 respondd.py[770]:     result = self.source.call(*args)
Feb 18 17:45:30 respondd.py[770]:   File "/opt/mesh-announce/providers/neighbours/batadv.py", line 23, in call
Feb 18 17:45:30 respondd.py[770]:     ifneighbours[fields[0]] = {'lastseen': float(fields[1].strip('s')), 'tq': int(fields[2])}
Feb 18 17:45:30 respondd.py[770]: ValueError: invalid literal for int() with base 10: '10000.0'

I think we need to have something like int(float('10000.0')) instead here

Activity

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions