[Patchew-devel] [PATCH 04/10] testing: Fix git info for testing-get method

Fam Zheng famz at redhat.com
Thu Jul 26 01:47:19 UTC 2018


Git properties are no longer there, we have to go for the Result object.

Signed-off-by: Fam Zheng <famz at redhat.com>
---
 mods/testing.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/mods/testing.py b/mods/testing.py
index 70b4674..3403e8b 100644
--- a/mods/testing.py
+++ b/mods/testing.py
@@ -377,10 +377,12 @@ class TestingGetView(APILoginRequiredView):
         return r
 
     def _generate_series_test_data(self, s, test):
+        gr = s.git_result
+        assert gr.is_success()
         return self._generate_test_data(project=s.project.name,
-                                        repo=s.get_property("git.repo"),
-                                        head=s.get_property("git.tag"),
-                                        base=s.get_property("git.base"),
+                                        repo=gr.data["repo"],
+                                        head=gr.data["tag"],
+                                        base=gr.data.get("base", None),
                                         identity={
                                             "type": "series",
                                             "message-id": s.message_id,
-- 
2.17.1




More information about the Patchew-devel mailing list