summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--yardstick/common/constants.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/yardstick/common/constants.py b/yardstick/common/constants.py
index 32ed746df..646a1f2ca 100644
--- a/yardstick/common/constants.py
+++ b/yardstick/common/constants.py
@@ -7,9 +7,9 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
from __future__ import absolute_import
-import os
-import errno
+import errno
+import os
from functools import reduce
import pkg_resources
@@ -40,10 +40,8 @@ def get_param(key, default=''):
try:
with open(conf_file) as f:
value = yaml_load(f)
- except IOError:
- pass
- except OSError as e:
- if e.errno != errno.EEXIST:
+ except (IOError, OSError) as e:
+ if e.errno != errno.ENOENT:
raise
else:
CONF.update(value)