diff sat_frontends/jp/cmd_input.py @ 3407:2f0be2b7de68

jp: replace `no_lf` argument by `end` in `disp` (same as in `print`)
author Goffi <goffi@goffi.org>
date Thu, 12 Nov 2020 14:53:16 +0100
parents 559a625a236b
children be6d91572633
line wrap: on
line diff
--- a/sat_frontends/jp/cmd_input.py	Thu Nov 12 14:53:15 2020 +0100
+++ b/sat_frontends/jp/cmd_input.py	Thu Nov 12 14:53:16 2020 +0100
@@ -194,9 +194,10 @@
                 error=True,
             )
             self.host.quit(C.EXIT_DATA_ERROR)
+        end = '\n' if self.args.debug else ' '
         self.disp(
             A.color(C.A_HEADER, _("command {idx}").format(idx=self.idx)),
-            no_lf=not self.args.debug,
+            end = end,
         )
         stdin = "".join(self._stdin)
         if self.args.debug:
@@ -226,7 +227,7 @@
             )
             self.disp("\n")
         else:
-            self.disp(" (" + ", ".join(self._values_ori) + ")", 2, no_lf=True)
+            self.disp(" (" + ", ".join(self._values_ori) + ")", 2, end=' ')
             args = [sys.argv[0]] + self.args.command + self._opts + self._pos
             p = await asyncio.create_subprocess_exec(
                 *args,