diff options
author | dyh <dengyuanhong@chinamobile.com> | 2019-12-04 16:19:38 +0800 |
---|---|---|
committer | dyh <dengyuanhong@chinamobile.com> | 2019-12-04 16:22:35 +0800 |
commit | f96008008bcbefd4142611c9ecca45899c5bb7d6 (patch) | |
tree | 3594854d280b97393595989cd903fd5f2a8bd2d2 /catalog/pub | |
parent | 06bfcce3f57176e6b428e43e8e411e245a5fa75e (diff) |
update ns on_distribute method
Issue-ID: MODELING-289
Change-Id: Iba353d152b4895a93d0d41ac58afd63f1845c5d4
Signed-off-by: dyh <dengyuanhong@chinamobile.com>
Diffstat (limited to 'catalog/pub')
-rw-r--r-- | catalog/pub/msapi/sdc.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/catalog/pub/msapi/sdc.py b/catalog/pub/msapi/sdc.py index bb473cc..4b50aab 100644 --- a/catalog/pub/msapi/sdc.py +++ b/catalog/pub/msapi/sdc.py @@ -90,6 +90,8 @@ def get_asset(asset_type, uuid): logger.error("Status code is %s, detail is %s.", ret[2], ret[1]) raise CatalogException("Failed to get asset(%s, %s) from sdc." % (asset_type, uuid)) asset = json.JSONDecoder().decode(ret[1]) + if len(asset) == 0: + raise CatalogException("Failed to get asset(%s, %s) from sdc." % (asset_type, uuid)) if asset.get("distributionStatus", None) != DISTRIBUTED: raise CatalogException("The asset (%s,%s) is not distributed from sdc." % (asset_type, uuid)) else: |