Comment 2 for bug 2059796

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

After racking my brains thinking this had to do with deb822, I found that a Dbus exception was being suppressed by only logging one particular exception. Disabling the catch with

--->
    def on_remove_clicked(self, widget):
        """Remove the selected source"""
        model = self.treeview_sources.get_model()
        (path, column) = self.treeview_sources.get_cursor()
        iter = model.get_iter(path)
        if iter:
            source_entry = model.get_value(iter, LIST_ENTRY_OBJ)
            #try:
            self.backend.RemoveSource(str(source_entry))
            #except dbus.DBusException as e:
            # maybe_log_authentication_canceled_error(e)
<---

reveals the issue:

--->
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1159, in on_remove_clicked
    self.backend.RemoveSource(str(source_entry))
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 634, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: com.ubuntu.SoftwareProperties.PermissionDeniedByPolicy: com.ubuntu.softwareproperties.applychanges
<---