diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-09-17 21:28:17 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-09-17 21:28:17 +0100 |
commit | 521cd9b1c25d88162f377bb05c8aadb70df028d7 (patch) | |
tree | 0f36169bd921303c2859d346235749b332379a2a /src/backend/resolveDeps.py | |
parent | fb5e03d66502482c3e6b4b04d92a46898403e98c (diff) |
move subprocess.Popen.communicate at the end of the data stream
Diffstat (limited to 'src/backend/resolveDeps.py')
-rw-r--r-- | src/backend/resolveDeps.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/resolveDeps.py b/src/backend/resolveDeps.py index f0af4c0..580bfd4 100644 --- a/src/backend/resolveDeps.py +++ b/src/backend/resolveDeps.py @@ -10,7 +10,6 @@ def package(pkgname): areSources = [] needsConfig = int() portageExec = subprocess.Popen(['emerge', '--quiet', '--pretend', '--getbinpkg', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = portageExec.communicate() for portageOutput in io.TextIOWrapper(portageExec.stderr, encoding="utf-8"): if "The following keyword changes are necessary to proceed:" in portageOutput.rstrip(): @@ -34,6 +33,7 @@ def package(pkgname): isSource = str(portageOutput.rstrip().split("]")[1].split("[")[0].strip("\ ")) areSources.append(isSource) + stdout, stderr = portageExec.communicate() return areBinaries,areSources,needsConfig @animation.wait('resolving dependencies') @@ -42,7 +42,6 @@ def world(): areSources = [] needsConfig = int() portageExec = subprocess.Popen(['emerge', '--quiet', '--update', '--deep', '--newuse', '--pretend', '--getbinpkg', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = portageExec.communicate() for portageOutput in io.TextIOWrapper(portageExec.stderr, encoding="utf-8"): if "The following keyword changes are necessary to proceed:" in portageOutput.rstrip(): @@ -66,4 +65,5 @@ def world(): isSource = str(portageOutput.rstrip().split("]")[1].split("[")[0].strip("\ ")) areSources.append(isSource) + stdout, stderr = portageExec.communicate() return areBinaries,areSources,needsConfig |