[Patchew-devel] [PATCH] testing: disable newline translation

Paolo Bonzini posted 1 patch 5 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/patchew next tags/patchew/20190113152718.2969-1-pbonzini@redhat.com
patchew-cli | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[Patchew-devel] [PATCH] testing: disable newline translation

Posted by Paolo Bonzini 5 weeks ago
Newline translation causes carriage returns to be translated to newlines.  This is
undesirable as it causes progress updates to be reported each on its own line.

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

diff --git a/patchew-cli b/patchew-cli
index cfc106e..44fd3e3 100755
--- a/patchew-cli
+++ b/patchew-cli
@@ -510,7 +510,7 @@ class TesterCommand(SubCommand):
         print("  Project:", r["project"])
         print("  Identity:", str(r["identity"]))
         logf = open(os.path.join(wd, "log"), "w+", encoding="utf-8",
-                    errors="ignore")
+                    newline='', errors="ignore")
         test_cmd = r["test"]["script"]
         script = r["test"]["script"].strip() + "\n"
         test_script = self._make_script(wd, "run", script)
-- 
2.20.1

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

Re: [Patchew-devel] [PATCH] testing: disable newline translation

Posted by Fam Zheng 5 weeks ago

> On Jan 13, 2019, at 23:27, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
> Newline translation causes carriage returns to be translated to newlines.  This is
> undesirable as it causes progress updates to be reported each on its own line.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> patchew-cli | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/patchew-cli b/patchew-cli
> index cfc106e..44fd3e3 100755
> --- a/patchew-cli
> +++ b/patchew-cli
> @@ -510,7 +510,7 @@ class TesterCommand(SubCommand):
>         print("  Project:", r["project"])
>         print("  Identity:", str(r["identity"]))
>         logf = open(os.path.join(wd, "log"), "w+", encoding="utf-8",
> -                    errors="ignore")
> +                    newline='', errors="ignore")
>         test_cmd = r["test"]["script"]
>         script = r["test"]["script"].strip() + "\n"
>         test_script = self._make_script(wd, "run", script)

Makes sense!

Reviewed-by: Fam Zheng <fam@euphon.net>


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



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