envoyproxy / envoy-tools

Companion tooling for Envoy proxy
Apache License 2.0
49 stars 24 forks source link

envoystat: specify that interval is an int argument #6

Closed derekargueta closed 6 years ago

derekargueta commented 6 years ago

Without this fix I was getting the following error on both Python 2 and 3:

➜  envoy-tools git:(dereka/py3) ✗ python envoystat/envoystat.py -a http://localhost:9901 -p http.ingress_http.downstream_ -i 1 -f rq_2xx rq_5xx
2018/08/01 envoy 0/1.8.0-dev//DEBUG live 324 324 0

07:56:48 PM     rq_2xx     rq_5xx
Traceback (most recent call last):
  File "envoystat/envoystat.py", line 113, in <module>
    main(vars(parser.parse_args()))
  File "envoystat/envoystat.py", line 65, in main
    next_loop_delay = args['interval'] - (time.time() - loop_start)
TypeError: unsupported operand type(s) for -: 'str' and 'float'

Signed-off-by: Derek Argueta dereka@pinterest.com