From 9e8ecb2edf404fa74b8e19627ffb9302429485fb Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Thu, 27 May 2021 14:51:51 -0600 Subject: [PATCH] update_dependencies.py removed bash commands from subprocess.call overly complicated things. Signed-off-by: Chuck SmileyRekiere --- py-scripts/update_dependencies.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/py-scripts/update_dependencies.py b/py-scripts/update_dependencies.py index 4a4787cc..38e299d2 100755 --- a/py-scripts/update_dependencies.py +++ b/py-scripts/update_dependencies.py @@ -18,11 +18,7 @@ def main(): packages_installed = [] packages_failed =[] for package in packages: - command = "if ($( pip3 install {} --upgrade > /tmp/pip-out 2> /tmp/pip-err ));" \ - "then echo Success;" \ - "else echo Problem installing {} please run that by hand;" \ - "fi".format(package, package) - + command = "pip3 install {} ".format(package) res = subprocess.call(command, shell = True) if res == 0: print("Package {} install SUCCESS Returned Value: {} ".format(package, res)) @@ -32,10 +28,9 @@ def main(): print("To see errors try: pip3 install {}".format(package)) packages_failed.append(package) - if len(packages_failed) > 0: - print("Install Complete") - print("Packages Installed Success: {}\n".format(packages_installed)) - print("Packages Failed (Some scripts may not need these packages): {}".format(packages_failed)) + print("Install Complete") + print("Packages Installed Success: {}\n".format(packages_installed)) + print("Packages Failed (Some scripts may not need these packages): {}".format(packages_failed)) if __name__ == "__main__": main()