gsettings-schema-convert has syntax errors

Bug #1519518 reported by LaMont Jones
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gconf (Ubuntu)
Fix Released
Low
Unassigned
Wily
Confirmed
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

Tags: patch
Revision history for this message
LaMont Jones (lamont) wrote :
Logan Rosen (logan)
affects: gconf2 (Ubuntu) → gconf (Ubuntu)
description: updated
tags: added: patch
Revision history for this message
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
Revision history for this message
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))...

Revision history for this message
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
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.