Revert "black: re-format"
This reverts commit 5731818de0ce446ceaafc7e75ae39da1b69942ae.
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
Change-Id: Ie61cdc8c7f2825b0d9d66be87a6a3a058de2b372
diff --git a/gui/lib/utils_get_version.py b/gui/lib/utils_get_version.py
index 3f1d331..0c7f279 100755
--- a/gui/lib/utils_get_version.py
+++ b/gui/lib/utils_get_version.py
@@ -1,19 +1,11 @@
#!/usr/bin/env python3
+import gen_print as gp
+import gen_cmd as gc
import collections
-import gen_cmd as gc
-import gen_print as gp
-
-module_names = [
- "Selenium2Library",
- "SeleniumLibrary",
- "SSHLibrary",
- "requests",
- "XvfbRobot",
- "robotremoteserver",
- "redfish",
-]
+module_names = ['Selenium2Library', 'SeleniumLibrary', 'SSHLibrary', 'requests',
+ 'XvfbRobot', 'robotremoteserver', 'redfish']
import_versions = collections.OrderedDict()
@@ -21,13 +13,8 @@
try:
cmd_buf = "import " + module_name
exec(cmd_buf)
- cmd_buf = (
- "import_versions['"
- + module_name
- + "'] = "
- + module_name
- + ".__version__"
- )
+ cmd_buf = "import_versions['" + module_name + "'] = " + module_name \
+ + ".__version__"
exec(cmd_buf)
except ImportError:
import_versions[module_name] = "Not installed"
@@ -63,30 +50,21 @@
quiet = 1
versions = collections.OrderedDict()
- for package in ["python", "python3", "robot", "firefox", "google-chrome"]:
+ for package in ['python', 'python3', 'robot', 'firefox', 'google-chrome']:
# Note: "robot --version" returns 0x00000000000000fb.
# Note: If package does not exist, 0x7f is returned.
- rc, version = gc.shell_cmd(
- package + " --version", valid_rcs=[0, 0x7F, 0xFB]
- )
- versions[package] = (
- "Not installed" if rc == 0x7F else version.rstrip("\n")
- )
+ rc, version = gc.shell_cmd(package + " --version",
+ valid_rcs=[0, 0x7f, 0xfb])
+ versions[package] = "Not installed" if rc == 0x7f else version.rstrip('\n')
versions.update(import_versions)
- for package in [
- "robotframework-angularjs",
- "robotframework-scplibrary",
- "robotframework-extendedselenium2library",
- ]:
- rc, version = gc.shell_cmd(
- "pip3 show " + package + " | grep Version | sed -re 's/.*: //g'"
- )
- versions[package] = (
- "Not installed" if not version else version.rstrip("\n")
- )
+ for package in ['robotframework-angularjs', 'robotframework-scplibrary',
+ 'robotframework-extendedselenium2library']:
+ rc, version = gc.shell_cmd("pip3 show " + package
+ + " | grep Version | sed -re 's/.*: //g'")
+ versions[package] = "Not installed" if not version else version.rstrip('\n')
rc, version = gc.shell_cmd("lsb_release -d -s")
- versions["host OS"] = "Failed" if not version else version.rstrip("\n")
+ versions["host OS"] = "Failed" if not version else version.rstrip('\n')
return versions