diff options
author | 2020-07-30 17:36:17 +0800 | |
---|---|---|
committer | 2020-07-30 17:49:13 +0800 | |
commit | d4f87a40133722da489e4ae03825be544a7baca7 (patch) | |
tree | ea9b026c450d7f10fdaa066693bcf056e0c0e27b /catalog/pub | |
parent | 7a0c2aa47bc5297a7977e7b7d1a362768efa1e17 (diff) |
fix the bug: Exception with e.message
Change-Id: Ia5a24a8dd15ca80cd6f36230933bc4451c7cde67
Issue-ID: MODELING-406
Signed-off-by: Mars chen <chenzihao@bupt.edu.cn>
Diffstat (limited to 'catalog/pub')
-rw-r--r-- | catalog/pub/Dmaap_lib/dmaap/identity.py | 4 | ||||
-rw-r--r-- | catalog/pub/msapi/sdc_controller.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/catalog/pub/Dmaap_lib/dmaap/identity.py b/catalog/pub/Dmaap_lib/dmaap/identity.py index 57f4016..6e801e8 100644 --- a/catalog/pub/Dmaap_lib/dmaap/identity.py +++ b/catalog/pub/Dmaap_lib/dmaap/identity.py @@ -47,7 +47,7 @@ class IdentityClient: } return resp_data except Exception as e: - raise DmaapClientException('create apikey from dmaap failed: ' + e.message) + raise DmaapClientException('create apikey from dmaap failed: ' + str(e)) def get_apikey(self, apikey): try: @@ -59,7 +59,7 @@ class IdentityClient: ret = ret.json() return ret except Exception as e: - raise DmaapClientException('get apikey from dmaap failed: ' + e.message) + raise DmaapClientException('get apikey from dmaap failed: ' + str(e)) def delete_apikey(self): pass diff --git a/catalog/pub/msapi/sdc_controller.py b/catalog/pub/msapi/sdc_controller.py index c46503f..505443a 100644 --- a/catalog/pub/msapi/sdc_controller.py +++ b/catalog/pub/msapi/sdc_controller.py @@ -47,7 +47,7 @@ class SDCController(Thread): self.scheduler.start() except Exception as e: logger.error('start sdc controller failed.') - logger.error(e.message) + logger.error(str(e)) logger.error(traceback.format_exc()) def fetch_notification(self): @@ -62,7 +62,7 @@ class SDCController(Thread): process_notification(notification_callback) except Exception as e: logger.error('fetch message from dmaap failed.') - logger.error(e.message) + logger.error(str(e)) logger.error(traceback.format_exc()) @@ -184,7 +184,7 @@ def send_notification_status(status_topic, now_ms, distribution_id, artifact, is logger.error('failed to send notification status, %s messages unsent', len(stuck)) except Exception as e: logger.error('failed to send notification status.') - logger.error(e.message) + logger.error(str(e)) logger.error(traceback.format_exc()) return status |