check_control_files.py: fix bug in GetUseFlags()
After creating a subprocess to run equery, we check if the
subprocess exited with success. If the equery subprocess did
not exit with success, then we assume there are no use flags
for the given board.
I'm not sure if that's really the right thing to do in general.
(If equery fails, perhaps we should abort?) But it's definitely
not the right thing to do when the subprocesses' returncode
attribute is None. In that case, the equery subprocess has not
finished executing.
Per the subprocess module's documentation, we can force our
code to wait for the subprocess to complete, by calling
communicate(). Do so.
BUG=chromium:490450
TEST=manual
Manual test
-----------
1. Modify network_WiFi_Regulatory.py
2. repo upload
Change-Id: I838d2a63dd75cb81dd02dcc3be258f70e195c782
Reviewed-on: https://chromium-review.googlesource.com/272544
Trybot-Ready: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Shuqian Zhao <shuqianz@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
1 file changed