[Patchew-devel] [PATCH] patchew-cli: allow an empty git setup

Paolo Bonzini posted 1 patch 3 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/patchew-ci tags/patchew/20210614173500.746969-1-pbonzini@redhat.com
patchew-cli | 3 +++
1 file changed, 3 insertions(+)

[Patchew-devel] [PATCH] patchew-cli: allow an empty git setup

Posted by Paolo Bonzini 3 months, 1 week ago
A partly configured project can break the update completely.  Avoid this
by logging the improper configuration and exiting.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 patchew-cli | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/patchew-cli b/patchew-cli
index c68abf9..9472554 100755
--- a/patchew-cli
+++ b/patchew-cli
@@ -349,6 +349,9 @@ class ProjectCommand(SubCommand):
         )
 
     def update_one_project(self, wd, project):
+        if not project["git"]:
+            logging.info("Project '%s' not configured", project["name"])
+            return
         logging.info("Updating project '%s'", project["name"])
         clone = os.path.join("/var/tmp/patchew-project-update", project["name"])
         if " " in project["git"]:
-- 
2.31.1

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel

Re: [Patchew-devel] [PATCH] patchew-cli: allow an empty git setup

Posted by Philippe Mathieu-Daudé 3 months ago
On 6/14/21 7:35 PM, Paolo Bonzini wrote:
> A partly configured project can break the update completely.  Avoid this
> by logging the improper configuration and exiting.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  patchew-cli | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel