[Bug 1147106] New: gtk-builder-convert broken in gtk2-devel
http://bugzilla.opensuse.org/show_bug.cgi?id=1147106 Bug ID: 1147106 Summary: gtk-builder-convert broken in gtk2-devel Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.1 Hardware: x86-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: bnc-team-screening@forge.provo.novell.com Reporter: martin@winter-rosenheim.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- The gtk-builder-convert utility contained in gtk2-devel is broken by the gtk2-converter-python3.patch in several ways: * In line 262, tabs are used instead of spaces for indentation. This leads to a syntax error message. * The statement in line 280 gives the following syntax error message. After replacing this statement with the proposal already made for python 2.4 in the comment lines immediately above, the utility runs without error message. Traceback (most recent call last): File "./gtk-builder-convert", line 802, in <module> sys.exit(main(sys.argv)) File "./gtk-builder-convert", line 790, in main conv.parse_file(input_filename) File "./gtk-builder-convert", line 162, in parse_file self._parse() File "./gtk-builder-convert", line 280, in _parse root_objects.sort(lambda a, b: cmp(b.getAttribute('id'), TypeError: must use keyword argument for key function * After correcting these two errors, the output of the tool is as follows: * if it goes to stdout, the output is a single line with a large string enclosed in b'...' containing the xml output with newlines escaped with \n. * if a filename is given, the following error message occurs: Traceback (most recent call last): File "./gtk-builder-convert", line 802, in <module> sys.exit(main(sys.argv)) File "./gtk-builder-convert", line 796, in main open(output_filename, 'w').write(xml) TypeError: write() argument must be str, not bytes Changing line 789 to xml = _indent(conv.to_xml()).decode("utf-8") fixes this, however I'm not a python expert and cannot tell whether this is the right fix. All three problems are probably introduced by the gtk2-converter-python3.patch, which unveils some problems already contained in upstream, see https://gitlab.gnome.org/GNOME/gtk/blob/gtk-2-24/gtk/gtk-builder-convert. Please extend and correct this patch. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1147106
Martin Winter
http://bugzilla.opensuse.org/show_bug.cgi?id=1147106
http://bugzilla.opensuse.org/show_bug.cgi?id=1147106#c1
--- Comment #1 from Martin Winter
http://bugzilla.opensuse.org/show_bug.cgi?id=1147106
http://bugzilla.opensuse.org/show_bug.cgi?id=1147106#c2
--- Comment #2 from Martin Winter
participants (1)
-
bugzilla_noreply@novell.com