]> git.pld-linux.org Git - packages/GConf2.git/blame - python3.patch
- python3 patch from Debian
[packages/GConf2.git] / python3.patch
CommitLineData
a0582b5d
MK
1diff -ur GConf-3.2.6.orig/gsettings/gsettings-schema-convert GConf-3.2.6/gsettings/gsettings-schema-convert
2--- GConf-3.2.6.orig/gsettings/gsettings-schema-convert 2012-04-10 01:58:44.000000000 +0200
3+++ GConf-3.2.6/gsettings/gsettings-schema-convert 2023-07-23 13:55:53.263588352 +0200
4@@ -1,4 +1,4 @@
5-#!/usr/bin/env python
6+#!/usr/bin/python3
7 # vim: set ts=4 sw=4 et: coding=UTF-8
8 #
9 # Copyright (c) 2010, Novell, Inc.
10@@ -603,7 +603,7 @@
11 for line in lines:
12 current_line_nb += 1
13 self.parse_line(line)
14- except GSettingsSchemaConvertException, e:
15+ except GSettingsSchemaConvertException as e:
16 raise GSettingsSchemaConvertException('%s:%s: %s' % (os.path.basename(self.file), current_line_nb, e))
17
18 return self.root
19@@ -1095,7 +1095,7 @@
20 try:
21 parser = GConfSchemaParser(argfile, options.gettext_domain, options.schema_id, options.keep_underscores)
22 schema_root = parser.parse()
23- except SyntaxError, e:
24+ except SyntaxError as e:
25 raise GSettingsSchemaConvertException('\'%s\' does not look like a valid gconf schema file: %s' % (argfile, e))
26 else:
27 # autodetect if file is XML or not
28@@ -1104,7 +1104,7 @@
29 schema_root = parser.parse()
30 if not options.simple and not options.xml:
31 options.simple = True
32- except SyntaxError, e:
33+ except SyntaxError as e:
34 parser = SimpleSchemaParser(argfile)
35 schema_root = parser.parse()
36 if not options.simple and not options.xml:
37@@ -1124,16 +1124,16 @@
38 sys.stdout.write(output)
39 else:
40 try:
41- fout = open(options.output, 'w')
42+ fout = open(options.output, 'wb')
43 fout.write(output)
44 fout.close()
45- except GSettingsSchemaConvertException, e:
46+ except GSettingsSchemaConvertException as e:
47 fout.close()
48 if os.path.exists(options.output):
49 os.unlink(options.output)
50 raise e
51
52- except GSettingsSchemaConvertException, e:
53+ except GSettingsSchemaConvertException as e:
54 print >> sys.stderr, '%s' % e
55 return 1
56
This page took 0.3809 seconds and 4 git commands to generate.