summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2015-08-03 17:13:52 -0700
committerDylan Baker <baker.dylan.c@gmail.com>2015-08-03 17:13:52 -0700
commit59d2bc1ab6d093bac50c89425743c6188a7f7f67 (patch)
tree9b7c9f9644ff0de450d5d880a779e3a7b9a67c47
parent25f58b2ef0ef80a9dbcb43e6976927fdcb28b617 (diff)
core.py: use errno instead of int for error checking
This makes the code a little cleaner and easier to read. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
-rw-r--r--framework/core.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/core.py b/framework/core.py
index f9cdbfe5b..63cb91155 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -204,8 +204,9 @@ def collect_system_info():
stderr=subprocess.STDOUT)
except OSError as e:
# If we get the 'no file or directory' error then pass, that means
- # that the binary isn't installed or isn't relavent to the system
- if e.errno != 2:
+ # that the binary isn't installed or isn't relavent to the system.
+ # If it's any other OSError, then raise
+ if e.errno != errno.ENOENT:
raise
except subprocess.CalledProcessError:
# If the binary is installed by doesn't work on the window system