diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2015-08-03 17:13:52 -0700 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2015-08-03 17:13:52 -0700 |
commit | 59d2bc1ab6d093bac50c89425743c6188a7f7f67 (patch) | |
tree | 9b7c9f9644ff0de450d5d880a779e3a7b9a67c47 | |
parent | 25f58b2ef0ef80a9dbcb43e6976927fdcb28b617 (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.py | 5 |
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 |