Projet

Général

Profil

0001-build-filter-dbus-bug-assert-to-avoid-log-bloat-6080.patch

Corentin Séchet, 16 mars 2022 16:09

Télécharger (1,36 ko)

Voir les différences:

Subject: [PATCH] build: filter dbus bug assert to avoid log bloat (#60807)

 src/inkscape_wrapper.py | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
src/inkscape_wrapper.py
1 1
#! /usr/bin/env python3
2 2
# inkscape wrapper to support command-line parameters for <1.0 and 1.0
3
# versions.
3
# versions, and filter output to avoid log spamming with dbus error
4
# (https://gitlab.com/inkscape/inkscape/-/issues/294)
4 5

  
5 6
import subprocess
6 7
import sys
......
14 15
        x.replace('--export-png', '--export-filename') for x in args if x not in ('--without-gui', '--file')
15 16
    ]
16 17

  
17
sys.exit(subprocess.call(['inkscape'] + args))
18
inkscape = subprocess.Popen(
19
    ['inkscape'] + args,
20
    stdout=subprocess.PIPE,
21
    stderr=subprocess.STDOUT,
22
    universal_newlines=True
23
)
24

  
25
for line in inkscape.stdout:
26
    if "dbus_g_connection_register_g_object: assertion 'connection != NULL' failed" in line:
27
        continue
28

  
29
    sys.stdout.write(line)
30

  
31
sys.exit(inkscape.returncode)
18
-