summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2017-12-04 16:46:01 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2017-12-04 16:46:01 +0800
commita97f123e12ea027e1d62682fd27fc9808e9a3e93 (patch)
treef70d285272e6460e2da1ebfc3124c95054100b73
parent8e61ca6da2ced03065d66f9bf001d491c2b398b8 (diff)
Fix pep8 error for vfc-nfvo-catalog
Change-Id: I36a16047f5713ab364ab78c8076213ad536a10d7 Issue-ID: VFC-609 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--catalog/packages/nf_package.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/catalog/packages/nf_package.py b/catalog/packages/nf_package.py
index a6916e99..289a12e4 100644
--- a/catalog/packages/nf_package.py
+++ b/catalog/packages/nf_package.py
@@ -96,7 +96,8 @@ class NfDistributeThread(threading.Thread):
except CatalogException as e:
self.rollback_distribute()
JobUtil.add_job_status(self.job_id, JOB_ERROR, e.message)
- except:
+ except Exception as e:
+ logger.error(e.message)
logger.error(traceback.format_exc())
logger.error(str(sys.exc_info()))
self.rollback_distribute()
@@ -149,7 +150,8 @@ class NfDistributeThread(threading.Thread):
try:
VnfPackageModel.objects.filter(vnfPackageId=self.csar_id).delete()
fileutil.delete_dirs(self.csar_save_path)
- except:
+ except Exception as e:
+ logger.error(e.message)
logger.error(traceback.format_exc())
logger.error(str(sys.exc_info()))
@@ -169,7 +171,8 @@ class NfPkgDeleteThread(threading.Thread):
self.delete_csar()
except CatalogException as e:
JobUtil.add_job_status(self.job_id, JOB_ERROR, e.message)
- except:
+ except Exception as e:
+ logger.error(e.message)
logger.error(traceback.format_exc())
logger.error(str(sys.exc_info()))
JobUtil.add_job_status(self.job_id, JOB_ERROR, "Failed to delete CSAR(%s)" % self.csar_id)