def push(self, repository=None, tag=None):
image = self<EOL>if repository or tag:<EOL><INDENT>image = self.tag_image(repository, tag)<EOL><DEDENT>for json_e in self.d.push(repository=image.name, tag=image.tag, stream=True, decode=True):<EOL><INDENT>logger.debug(json_e)<EOL>status = graceful_get(json_e, "<STR_LIT:status>")<EOL>if status:<EOL><INDENT>logger.info(status)<EOL><DEDENT>else:<EOL><INDENT>error = graceful_get(json_e, "<STR_LIT:error>")<EOL>if error is not None:<EOL><INDENT>logger.error(status)<EOL>raise ConuException("<STR_LIT>",<EOL>self.name, error)<EOL><DEDENT><DEDENT><DEDENT>return image<EOL>
Push image to registry. Raise exception when push fail.
:param repository: str, see constructor
:param tag: str, see constructor
:return: None