def finalize_build(self):
    if (not self._is_enabled):
        return
    if (not self._current_build):
        raise errors.UninitializedBuildError('Cannot finalize_build before build is initialized.')
    self.client.finalize_build(self._current_build['data']['id'])
    self._current_build = None
def finalize_build(self):
    if (not self._is_enabled):
        return
    if (not self._current_build):
        raise errors.UninitializedBuildError('Cannot finalize_build before build is initialized.')
    self.client.finalize_build(self._current_build['data']['id'])
    self._current_build = None