diff --git a/lib/request.py b/lib/request.py index afc24bf..33c62c1 100644 --- a/lib/request.py +++ b/lib/request.py @@ -3,9 +3,13 @@ class Request: self.number = int(xml.get("id")) self.creator = xml.get("creator") self.state = xml.find("state").get("name") + self.target = xml.find("action/target").get("project") self.type_ = xml.find("action").get("type") if self.type_ == "delete": + self.source_package = None + self.source_project = None + self.source_rev = None # not much to do return self @@ -15,8 +19,6 @@ class Request: # expanded MD5 or commit revision self.source_rev = xml.find("action/source").get("rev") - self.target = xml.find("action/target").get("project") - # TODO: support muti-action requests # TODO: parse review history # TODO: add description