Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:15.0:Staging:D
gtk2
gtk2-converter-python3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gtk2-converter-python3.patch of Package gtk2
Index: gtk+-2.24.31/gtk/gtk-builder-convert =================================================================== --- gtk+-2.24.31.orig/gtk/gtk-builder-convert +++ gtk+-2.24.31/gtk/gtk-builder-convert @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # # Copyright (C) 2006-2008 Async Open Source # Henrique Romano <henrique@async.com.br> @@ -210,7 +210,7 @@ class GtkBuilderConverter(object): obj.setAttribute('class', obj_class) obj.setAttribute('id', obj_id) if properties: - for name, value in properties.items(): + for name, value in list(properties.items()): if isinstance(value, Node): # Reuse the node, so translatable and context still will be # set when converting nodes. See also #509153 @@ -259,7 +259,7 @@ class GtkBuilderConverter(object): for node in objects: self._convert(node.getAttribute("class"), node) if self._get_object(node.getAttribute('id')) is not None: - print "WARNING: duplicate id \"" + node.getAttribute('id') + "\"" + print("WARNING: duplicate id \"" + node.getAttribute('id') + "\"") self.objects[node.getAttribute('id')] = node # Convert Gazpachos UI tag @@ -461,8 +461,8 @@ class GtkBuilderConverter(object): if signal_name in ['activate', 'toggled']: action.appendChild(signal) else: - print 'Unhandled signal %s::%s' % (node.getAttribute('class'), - signal_name) + print('Unhandled signal %s::%s' % (node.getAttribute('class'), + signal_name)) if not uimgr.childNodes: child = self._dom.createElement('child') @@ -481,8 +481,8 @@ class GtkBuilderConverter(object): for accelerator in get_accelerator_nodes(node): signal_name = accelerator.getAttribute('signal') if signal_name != 'activate': - print 'Unhandled accelerator signal for %s::%s' % ( - node.getAttribute('class'), signal_name) + print('Unhandled accelerator signal for %s::%s' % ( + node.getAttribute('class'), signal_name)) continue accelerator.removeAttribute('signal') child.appendChild(accelerator) @@ -747,7 +747,7 @@ def _indent(output): return s.stdout.read() def usage(): - print __doc__ + print(__doc__) def main(args): try: @@ -788,10 +788,10 @@ def main(args): xml = _indent(conv.to_xml()) if output_filename == "-": - print xml + print(xml) else: open(output_filename, 'w').write(xml) - print "Wrote", output_filename + print("Wrote", output_filename) return 0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor