소스 검색

oc_process: Better error output on failed template() call

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Jose A. Rivera 8 년 전
부모
커밋
cd10742ac6
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      roles/lib_openshift/library/oc_process.py
  2. 1 1
      roles/lib_openshift/src/class/oc_process.py

+ 1 - 1
roles/lib_openshift/library/oc_process.py

@@ -1450,7 +1450,7 @@ class OCProcess(OpenShiftCLI):
         if self._template is None:
             results = self._process(self.name, False, self.params, self.data)
             if results['returncode'] != 0:
-                raise OpenShiftCLIError('Error processing template [%s].' % self.name)
+                raise OpenShiftCLIError('Error processing template [%s]: %s' %(self.name, results))
             self._template = results['results']['items']
 
         return self._template

+ 1 - 1
roles/lib_openshift/src/class/oc_process.py

@@ -30,7 +30,7 @@ class OCProcess(OpenShiftCLI):
         if self._template is None:
             results = self._process(self.name, False, self.params, self.data)
             if results['returncode'] != 0:
-                raise OpenShiftCLIError('Error processing template [%s].' % self.name)
+                raise OpenShiftCLIError('Error processing template [%s]: %s' %(self.name, results))
             self._template = results['results']['items']
 
         return self._template