Close race in opening pid-file in network_chroot

The "get_pid_file()" method in network_chroot had a missing_ok
parameter which intended to avoid a test failure if the pid
file was missing.  Unfortunately this was implemented as a
"os.path.exists()" test, followed by an open.  This opens up
a small window where the pid file may disappear between the
test and the open attempt.  Instead, drop the test and catch
"not found" exceptions when we try to open the file.

TEST=run this test

Change-Id: If8afee3d22c620534d8a36ce9a25ffc571ceeac6
Reviewed-by: Christopher Wiley <>
Tested-by: Paul Stewart <>
Commit-Queue: Ben Chan <>
1 file changed