File: python_single_statement_set_default_console.diff

package info (click to toggle)
libgnatcoll-bindings 18-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 980 kB
  • sloc: ada: 6,581; ansic: 722; python: 687; makefile: 48; sh: 46
file content (21 lines) | stat: -rw-r--r-- 861 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Replace 3 statements with 1 in Python.Set_Default_Console.
 Py_Single_Input is limited to one statement and says:
 SyntaxError: multiple statements found while compiling a single statement
 This fixes a non-fatal error in gnat-gps.
Forwarded: no
Author: Nicolas Boulenguez <nicolas@debian.org>

--- a/python/gnatcoll-scripts-python.adb
+++ b/python/gnatcoll-scripts-python.adb
@@ -3711,9 +3711,8 @@
       else
          Cons := Run_Command
            (Script,
-            "sys.stdout = sys.__stdout__" & ASCII.LF
-            & "sys.stdin  = sys.__stdin__" & ASCII.LF
-            & "sys.stderr = sys.__stderr__",
+            "sys.stdout, sys.stdin, sys.stderr = "
+              & "sys.__stdout__, sys.__stdin__, sys.__stderr__",
             Hide_Output => True,
             Need_Output => False,
             Errors      => Errors'Access);