diff options
| author | John Jackson <[email protected]> | 2021-06-07 13:52:20 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-06-07 13:52:20 -0600 |
| commit | 62baabc31e86faca0cb554816a83ad38996272f7 (patch) | |
| tree | 819c87c2194f33c853005cb2468bd3ac1b50bfe6 | |
| parent | Add APFS extraction instructions. (diff) | |
| download | docker-osx-62baabc31e86faca0cb554816a83ad38996272f7.tar.xz docker-osx-62baabc31e86faca0cb554816a83ad38996272f7.zip | |
Change call function to Popen
The call function can deadlock if the child process prints larger output. Use Popen with the communicate() method with you need pipes. If you switch to Popen, you'll get cleaner debugging.
| -rwxr-xr-x | fetch-macOS.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fetch-macOS.py b/fetch-macOS.py index f4d7e36..b540db9 100755 --- a/fetch-macOS.py +++ b/fetch-macOS.py @@ -87,8 +87,8 @@ class ReplicationError(Exception): def cmd_exists(cmd): - return subprocess.call("type " + cmd, shell=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0 + proc subprocess.Popen("type " + cmd, shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) def replicate_url(full_url, |