gsettings-schema-convert has syntax errors

Bug #1519518 reported by LaMont Jones on 2015-11-24
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gconf (Ubuntu)
Low
Unassigned
Wily
Undecided
Unassigned

Bug Description

gconf 3.2.6-3ubuntu5 (xenial) has gsettings-schema-convert requiring python3, but without correct syntax:

gsettings-schema-convert --force --gconf --xml --schema-id "org.freedesktop.ibus" --output lamont.in ../../data/ibus.schemas.in
  File "/usr/bin/gsettings-schema-convert", line 606
    except GSettingsSchemaConvertException, e:
                                          ^
SyntaxError: invalid syntax

LaMont Jones (lamont) wrote :
Logan Rosen (logan) on 2015-11-24
affects: gconf2 (Ubuntu) → gconf (Ubuntu)
description: updated
tags: added: patch
Sebastien Bacher (seb128) wrote :

Thanks, the exception change makes sense, why did you do that bit though

- fout.write(output)
+ fout.write(str(output))

things seem to work without and lead to the same result?

Changed in gconf (Ubuntu):
importance: Undecided → Low
status: New → In Progress
LaMont Jones (lamont) wrote :

I forget exactly what the error message was, but I think it was the difference between whatever output is, and that write wanted a bytestring. -- it's possibl;e that should be fout.write(unicode(output))...

Sebastien Bacher (seb128) wrote :

Seems like Dimitri hit that issue as well and decided to upload a fix without checking for open bugs/pending work first,
https://launchpad.net/ubuntu/+source/gconf/3.2.6-3ubuntu6

closing since it's fixed...

Changed in gconf (Ubuntu):
status: In Progress → Fix Released
Dimitri John Ledkov (xnox) wrote :

the error is that output must be string for fout.write() function, since the file is opened in "text" mode (aka unicode)

I've opted to stay bi-lingual, and instead open the file in binary mode.

I'm sorry, I did not notice this bug report and patch, and already uploaded a fix for this =(

http://launchpadlibrarian.net/227772944/gconf_3.2.6-3ubuntu5_3.2.6-3ubuntu6.diff.gz

however i believe wily is affected and this should be SRUed.

Changed in gconf (Ubuntu):
status: Fix Released → Fix Committed
Dimitri John Ledkov (xnox) wrote :

gconf (3.2.6-3ubuntu6) xenial; urgency=medium

  * Fix gsettings-schema-convert pytwonisms.

 -- Dimitri John Ledkov <email address hidden> Fri, 27 Nov 2015 12:18:17 +0000

Changed in gconf (Ubuntu):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gconf (Ubuntu Wily):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers