patman: Adjust how the fake request() function is provided
Instead of passing the URL and function to each call, put the fake
into the Patchwork object instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/patman/control.py b/tools/patman/control.py
index 06a9dfd..cb8552e 100644
--- a/tools/patman/control.py
+++ b/tools/patman/control.py
@@ -24,6 +24,7 @@
from u_boot_pylib import tools
from patman import checkpatch
from patman import patchstream
+from patman import patchwork
from patman import send
@@ -95,12 +96,13 @@
# Allow the series to override the URL
if 'patchwork_url' in series:
url = series.patchwork_url
+ pwork = patchwork.Patchwork(url)
# Import this here to avoid failing on other commands if the dependencies
# are not present
from patman import status
status.check_and_show_status(series, found[0], branch, dest_branch, force,
- show_comments, url)
+ show_comments, pwork)
def do_patman(args):