def __init__(self, id, repository_id): req = requests.get(log_uri.format(job_id=id)) if req.status_code == requests.status_codes.codes.NOT_FOUND: raise AttributeError("A Job with this id does not exist") self.id = id self.content = req.content self.repository_id = repository_id
def update(self): """Updates the content the Log """ self.content = requests.get(log_uri.format(job_id=id)).content