summaryrefslogtreecommitdiffstats
path: root/opnfv_testapi/common
diff options
context:
space:
mode:
Diffstat (limited to 'opnfv_testapi/common')
-rw-r--r--opnfv_testapi/common/config.py2
-rw-r--r--opnfv_testapi/common/message.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/opnfv_testapi/common/config.py b/opnfv_testapi/common/config.py
index 75dbc35..a6ab338 100644
--- a/opnfv_testapi/common/config.py
+++ b/opnfv_testapi/common/config.py
@@ -49,7 +49,7 @@ class Config(object):
def _parse_value(value):
try:
value = int(value)
- except:
+ except Exception:
if str(value).lower() == 'true':
value = True
elif str(value).lower() == 'false':
diff --git a/opnfv_testapi/common/message.py b/opnfv_testapi/common/message.py
index 61ce03d..e9b3b1c 100644
--- a/opnfv_testapi/common/message.py
+++ b/opnfv_testapi/common/message.py
@@ -14,6 +14,10 @@ def key_error(key):
return "KeyError: '{}'".format(key)
+def no_file_uploaded():
+ return "Please upload a file."
+
+
def no_body():
return 'No Body'