From 65145d9aaefdda5e3312e5150fc5ffbb4d4735c8 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Wed, 23 Dec 2015 12:29:40 -0600 Subject: [PATCH] Also debug the user-agent --- speedtest_cli.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/speedtest_cli.py b/speedtest_cli.py index c00ab19..d8dd711 100755 --- a/speedtest_cli.py +++ b/speedtest_cli.py @@ -291,6 +291,7 @@ def build_user_agent(): 'speedtest-cli/%s' % __version__ ) USER_AGENT = ' '.join(ua_tuple) + printer(USER_AGENT, debug=True) return USER_AGENT @@ -1141,9 +1142,6 @@ def shell(): socket.setdefaulttimeout(args.timeout) - # Pre-cache the user agent string - build_user_agent() - # If specified bind to a specific IP address if args.source: SOURCE = args.source @@ -1156,6 +1154,9 @@ def shell(): if debug: DEBUG = True + # Pre-cache the user agent string + build_user_agent() + if args.simple or args.csv or args.json: quiet = True else: