Unify booleans coming and going from dbus
Bug #683619 reported by
Natalia Bidart
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu One Control Panel |
Fix Released
|
High
|
Natalia Bidart | ||
ubuntuone-control-panel (Ubuntu) |
Fix Released
|
Medium
|
Natalia Bidart |
Bug Description
Since we're passing booleans as strings when using dicts, we should unify how we 'encode' booleans.
I suggest using '1' for True and '0' for False, and an exception in any other case.
Related branches
lp:~nataliabidart/ubuntuone-control-panel/subscribe
- Alejandro J. Cura (community): Approve
- Roberto Alsina (community): Approve
-
Diff: 994 lines (+486/-123)8 files modifieddata/folders.ui (+39/-1)
ubuntuone/controlpanel/backend.py (+37/-8)
ubuntuone/controlpanel/dbus_client.py (+46/-6)
ubuntuone/controlpanel/gtk/gui.py (+55/-26)
ubuntuone/controlpanel/gtk/tests/test_gui.py (+107/-17)
ubuntuone/controlpanel/integrationtests/test_dbus_client_sd.py (+89/-42)
ubuntuone/controlpanel/integrationtests/test_dbus_service.py (+8/-8)
ubuntuone/controlpanel/tests/test_backend.py (+105/-15)
Changed in ubuntuone-control-panel: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Naty Bidart (nataliabidart) |
Changed in ubuntuone-control-panel (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Naty Bidart (nataliabidart) |
Changed in ubuntuone-control-panel: | |
status: | Triaged → In Progress |
Changed in ubuntuone-control-panel: | |
status: | In Progress → Fix Committed |
Changed in ubuntuone-control-panel (Ubuntu): | |
status: | Triaged → In Progress |
Changed in ubuntuone-control-panel: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I think we should take another look at using dbus Variants, and making the dictionaries we use as DBus parameters be of type (string, variant), instead of (string, string).
On the upsides, we won't have the problem mentioned on this bug, we might be able to send a DBus.dictionary as a value, it will look cleaner.
On the downside, in python-dbus, using variants is more noisy than just strings. For instance, to build up the dict to send thru dbus, each value should be created as dbus.String(u'abc', variant_level=1).