Vadims06 / ospfwatcher

History of all changes in OSPF Topology
https://topolograph.com/ospf-monitoring
GNU General Public License v3.0
64 stars 8 forks source link

first time configuration error #13

Closed bleuchtang closed 2 weeks ago

bleuchtang commented 2 weeks ago

When I run the client.py for the first time I got this error:

# docker run -it --rm --user $UID -v ./:/home/watcher/watcher/ -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro vadims06/ospf-watcher:latest python3 ./client.py --action add_watcher
[]
Traceback (most recent call last):
  File "/home/watcher/watcher/./client.py", line 477, in <module>
    watcher_conf = WATCHER_CONFIG.parse_command_args(args)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/watcher/watcher/./client.py", line 414, in parse_command_args
    watcher_num = args.watcher_num if args.watcher_num else cls.gen_next_free_number()
                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/watcher/watcher/./client.py", line 52, in gen_next_free_number
    expected_numbers = set(range(1, max(numbers) + 1))
                                    ^^^^^^^^^^^^
ValueError: max() arg is an empty sequence
Vadims06 commented 2 weeks ago

Fixed in https://github.com/Vadims06/ospfwatcher/commit/f8157c5dd0a3d54ddcb8744cefd235571cbe0585 Thanks for the report )