summaryrefslogtreecommitdiffstats
path: root/share/common
diff options
context:
space:
mode:
Diffstat (limited to 'share/common')
-rw-r--r--share/common/msapi/helper.py6
-rw-r--r--share/common/utils/aai_cache.py4
-rw-r--r--share/common/utils/fileutil.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/share/common/msapi/helper.py b/share/common/msapi/helper.py
index d45a7293..fa754aa6 100644
--- a/share/common/msapi/helper.py
+++ b/share/common/msapi/helper.py
@@ -349,7 +349,7 @@ class MultiCloudThreadHelper(object):
try:
item["status"] = worker(*payload) or 0
except Exception as e:
- item["status"] = e.message
+ item["status"] = str(e)
cache_item_for_query = {
"id": item["id"],
"status": item["status"]
@@ -364,14 +364,14 @@ class MultiCloudThreadHelper(object):
cache.set(self.owner.cache_expired_prefix + cache_item_for_query["id"], cache_item_for_query, 3600*24)
cache.delete(self.owner.cache_prefix + cache_item_for_query["id"])
except Exception as e:
- logger.error(e.message)
+ logger.error(str(e))
else:
item["timestamp"] = now
#update cache
try:
cache.set(self.owner.cache_prefix + cache_item_for_query["id"], cache_item_for_query, 3600*24)
except Exception as e:
- logger.error(e.message)
+ logger.error(str(e))
pass
# end of loop
# while True:
diff --git a/share/common/utils/aai_cache.py b/share/common/utils/aai_cache.py
index 41506aca..62545df6 100644
--- a/share/common/utils/aai_cache.py
+++ b/share/common/utils/aai_cache.py
@@ -33,7 +33,7 @@ def get_cache_by_url(resource_url):
else:
return None
except Exception as e:
- logger.error("get_cache_by_url exception: %s" % e.message)
+ logger.error("get_cache_by_url exception: %s" % str(e))
return None
@@ -45,7 +45,7 @@ def set_cache_by_url(resource_url, resource_in_json):
# logger.debug("Cache the resource: "+ resource_url)
cache.set("AAI_" + resource_url, json.dumps(resource_in_json), 3600 * 24)
except Exception as e:
- logger.error("get_cache_by_url exception: %s" % e.message)
+ logger.error("get_cache_by_url exception: %s" % str(e))
pass
def filter_cache_by_url(resource_url):
diff --git a/share/common/utils/fileutil.py b/share/common/utils/fileutil.py
index 5a1624b0..accd3bc3 100644
--- a/share/common/utils/fileutil.py
+++ b/share/common/utils/fileutil.py
@@ -28,7 +28,7 @@ def delete_dirs(path):
shutil.rmtree(path)
except Exception as e:
logger.error(traceback.format_exc())
- logger.error("Failed to delete %s:%s", path, e.message)
+ logger.error("Failed to delete %s:%s", path, str(e))
def download_file_from_http(url, local_dir, file_name):