mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
update_dependencies.py: makes script much quieter
Signed-off-by: Jed Reynolds <jed@candelatech.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# INCLUDE_IN_README
|
# INCLUDE_IN_README
|
||||||
'''
|
'''
|
||||||
NAME: update_dependencies.py
|
NAME: update_dependencies.py
|
||||||
|
|
||||||
PURPOSE: Installs python3 script package dependencies
|
PURPOSE: Installs python3 script package dependencies
|
||||||
|
|
||||||
@@ -18,10 +18,10 @@ def main():
|
|||||||
packages_installed = []
|
packages_installed = []
|
||||||
packages_failed =[]
|
packages_failed =[]
|
||||||
for package in packages:
|
for package in packages:
|
||||||
command = "pip3 install {} ".format(package)
|
command = "pip3 install {} >/tmp/pip3-stdout 2>/tmp/pip3-stderr".format(package)
|
||||||
res = subprocess.call(command, shell = True)
|
res = subprocess.call(command, shell = True)
|
||||||
if res == 0:
|
if res == 0:
|
||||||
print("Package {} install SUCCESS Returned Value: {} ".format(package, res))
|
#print("Package {} install SUCCESS Returned Value: {} ".format(package, res))
|
||||||
packages_installed.append(package)
|
packages_installed.append(package)
|
||||||
else:
|
else:
|
||||||
print("Package {} install FAILED Returned Value: {} ".format(package, res))
|
print("Package {} install FAILED Returned Value: {} ".format(package, res))
|
||||||
@@ -30,6 +30,8 @@ def main():
|
|||||||
|
|
||||||
print("Install Complete")
|
print("Install Complete")
|
||||||
print("Packages Installed Success: {}\n".format(packages_installed))
|
print("Packages Installed Success: {}\n".format(packages_installed))
|
||||||
|
if not packages_failed:
|
||||||
|
return
|
||||||
print("Packages Failed (Some scripts may not need these packages): {}".format(packages_failed))
|
print("Packages Failed (Some scripts may not need these packages): {}".format(packages_failed))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user