diff options
| author | Zygmunt Krynicki <zygmunt.krynicki@canonical.com> | 2014-06-11 17:29:08 +0200 |
|---|---|---|
| committer | Zygmunt Krynicki <zygmunt.krynicki@canonical.com> | 2014-06-11 17:29:08 +0200 |
| commit | 16c58cdb8a775bbfdfd63403b9395466b96b4de9 (patch) | |
| tree | 19a762a4639b5c26c1a756d1b67a565865ddd180 /bin | |
| parent | c85eb0671b874189602753868eb14fee9d51375f (diff) | |
providers:checkbox:gateway_ping_test: fix some odd code formatting
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/gateway_ping_test | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/gateway_ping_test b/bin/gateway_ping_test index e529249..d35c05f 100755 --- a/bin/gateway_ping_test +++ b/bin/gateway_ping_test @@ -95,9 +95,8 @@ def get_host_to_ping(interface=None, verbose=False, default=None): # Use check_output even if I'll discard the output # looks cleaner than using .call and redirecting stdout to null try: - (subprocess - .check_output(["ping", "-q", "-c", "1", "-b", iface[3]], - stderr=subprocess.STDOUT)) + subprocess.check_output(["ping", "-q", "-c", "1", "-b", + iface[3]], stderr=subprocess.STDOUT) except subprocess.CalledProcessError: pass # If default host given, ping it as well, @@ -216,7 +215,7 @@ def main(args): print(_( "ERROR: not enough time for {0} pings in {1} seconds" ).format(args.count, args.deadline)) - return(1) + return 1 elif args.deadline != default_delay: # Adjust count according to delay. args.count = args.deadline - 1 @@ -236,8 +235,8 @@ def main(args): "Adjusting deadline to {0} seconds to fit {1} pings" ).format(args.deadline, args.count)) # If given host is not pingable, override with something pingable. - host = get_host_to_ping(interface=args.interface, - verbose=args.verbose, default=args.host) + host = get_host_to_ping( + interface=args.interface, verbose=args.verbose, default=args.host) if args.verbose: print(_("Checking connectivity to {0}").format(host)) ping_summary = None |
