autotest (wifi): ensure footer data is written to disk

In SiteLinuxRouter._prep_probe_response_footer(), we write()
to a file, and then send_file() over to the router.

The problem is that Python buffers write()s. So, when send_file()
tries to read the data, it may still be stuck in a buffer inside
the Python process.

Fix this, by calling flush() before send_file().

BUG=chromium:512874
TEST=network_WiFi_MalformedProbeResp

Change-Id: I24a132666d764c14c527b2e9cb8315a47e431a9c
Reviewed-on: https://chromium-review.googlesource.com/287592
Trybot-Ready: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Rebecca Silberstein <silberst@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
1 file changed