Fix indentation in workererror

This commit is contained in:
Joseph Schorr 2017-01-12 16:53:12 -05:00
parent 10a7385891
commit 5218e60a25

View file

@ -5,91 +5,91 @@ class WorkerError(object):
self._base_message = base_message self._base_message = base_message
self._error_handlers = { self._error_handlers = {
'io.quay.builder.buildpackissue': { 'io.quay.builder.buildpackissue': {
'message': 'Could not load build package', 'message': 'Could not load build package',
'is_internal': True, 'is_internal': True,
}, },
'io.quay.builder.gitfailure': { 'io.quay.builder.gitfailure': {
'message': 'Could not clone git repository', 'message': 'Could not clone git repository',
'show_base_error': True, 'show_base_error': True,
}, },
'io.quay.builder.gitcheckout': { 'io.quay.builder.gitcheckout': {
'message': 'Could not checkout git ref. If you force pushed recently, ' + 'message': 'Could not checkout git ref. If you force pushed recently, ' +
'the commit may be missing.', 'the commit may be missing.',
'show_base_error': True, 'show_base_error': True,
}, },
'io.quay.builder.cannotextractbuildpack': { 'io.quay.builder.cannotextractbuildpack': {
'message': 'Could not extract the contents of the build package' 'message': 'Could not extract the contents of the build package'
}, },
'io.quay.builder.cannotpullforcache': { 'io.quay.builder.cannotpullforcache': {
'message': 'Could not pull cached image', 'message': 'Could not pull cached image',
'is_internal': True 'is_internal': True
}, },
'io.quay.builder.dockerfileissue': { 'io.quay.builder.dockerfileissue': {
'message': 'Could not find or parse Dockerfile', 'message': 'Could not find or parse Dockerfile',
'show_base_error': True 'show_base_error': True
}, },
'io.quay.builder.cannotpullbaseimage': { 'io.quay.builder.cannotpullbaseimage': {
'message': 'Could not pull base image', 'message': 'Could not pull base image',
'show_base_error': True 'show_base_error': True
}, },
'io.quay.builder.internalerror': { 'io.quay.builder.internalerror': {
'message': 'An internal error occurred while building. Please submit a ticket.', 'message': 'An internal error occurred while building. Please submit a ticket.',
'is_internal': True 'is_internal': True
}, },
'io.quay.builder.buildrunerror': { 'io.quay.builder.buildrunerror': {
'message': 'Could not start the build process', 'message': 'Could not start the build process',
'is_internal': True 'is_internal': True
}, },
'io.quay.builder.builderror': { 'io.quay.builder.builderror': {
'message': 'A build step failed', 'message': 'A build step failed',
'show_base_error': True 'show_base_error': True
}, },
'io.quay.builder.tagissue': { 'io.quay.builder.tagissue': {
'message': 'Could not tag built image', 'message': 'Could not tag built image',
'is_internal': True 'is_internal': True
}, },
'io.quay.builder.pushissue': { 'io.quay.builder.pushissue': {
'message': 'Could not push built image', 'message': 'Could not push built image',
'show_base_error': True, 'show_base_error': True,
'is_internal': True 'is_internal': True
}, },
'io.quay.builder.dockerconnecterror': { 'io.quay.builder.dockerconnecterror': {
'message': 'Could not connect to Docker daemon', 'message': 'Could not connect to Docker daemon',
'is_internal': True 'is_internal': True
}, },
'io.quay.builder.missingorinvalidargument': { 'io.quay.builder.missingorinvalidargument': {
'message': 'Missing required arguments for builder', 'message': 'Missing required arguments for builder',
'is_internal': True 'is_internal': True
}, },
'io.quay.builder.cachelookupissue': { 'io.quay.builder.cachelookupissue': {
'message': 'Error checking for a cached tag', 'message': 'Error checking for a cached tag',
'is_internal': True 'is_internal': True
}, },
'io.quay.builder.errorduringphasetransition': { 'io.quay.builder.errorduringphasetransition': {
'message': 'Error during phase transition. If this problem persists ' + 'message': 'Error during phase transition. If this problem persists ' +
'please contact customer support.', 'please contact customer support.',
'is_internal': True 'is_internal': True
}, },
'io.quay.builder.clientrejectedtransition': { 'io.quay.builder.clientrejectedtransition': {
'message': 'Build can not be finished due to user cancellation.', 'message': 'Build can not be finished due to user cancellation.',
} }
} }
def is_internal_error(self): def is_internal_error(self):
@ -110,10 +110,10 @@ class WorkerError(object):
def extra_data(self): def extra_data(self):
if self._base_message: if self._base_message:
return { return {
'base_error': self._base_message, 'base_error': self._base_message,
'error_code': self._error_code 'error_code': self._error_code
} }
return { return {
'error_code': self._error_code 'error_code': self._error_code
} }