diff -Nru software-properties-0.92.37.3/debian/changelog software-properties-0.92.37.4/debian/changelog --- software-properties-0.92.37.3/debian/changelog 2015-01-19 15:09:32.000000000 +0000 +++ software-properties-0.92.37.4/debian/changelog 2015-07-07 07:54:54.000000000 +0000 @@ -1,3 +1,12 @@ +software-properties (0.92.37.4) trusty-proposed; urgency=medium + + [ Bruno Nova ] + * fix importing keys from path with special chars + (LP: #1381050) + * fix key drag-and-drop (LP: #1383289) + + -- Michael Vogt Tue, 07 Jul 2015 09:53:07 +0200 + software-properties (0.92.37.3) trusty-proposed; urgency=medium * cloudarchive: Enable support for the Kilo Ubuntu Cloud Archive on diff -Nru software-properties-0.92.37.3/softwareproperties/gtk/SoftwarePropertiesGtk.py software-properties-0.92.37.4/softwareproperties/gtk/SoftwarePropertiesGtk.py --- software-properties-0.92.37.3/softwareproperties/gtk/SoftwarePropertiesGtk.py 2015-01-19 15:08:01.000000000 +0000 +++ software-properties-0.92.37.4/softwareproperties/gtk/SoftwarePropertiesGtk.py 2015-07-07 07:52:41.000000000 +0000 @@ -756,7 +756,7 @@ def on_auth_drag_data_received(self, widget, context, x, y, selection, target_type, timestamp): """Extract the dropped key and add it to the keyring""" - keydata = selection.data.strip() + keydata = selection.get_data().strip() if not self.add_key_from_data(keydata): error(self.window_main, _("Error importing key"), @@ -764,6 +764,9 @@ "or it might be corrupt.")) self.show_keys() + def add_key_from_data(self, keydata): + return self.backend.AddKeyFromData(keydata) + def on_button_revert_clicked(self, button): """Restore the source list from the startup of the dialog""" try: diff -Nru software-properties-0.92.37.3/softwareproperties/SoftwareProperties.py software-properties-0.92.37.4/softwareproperties/SoftwareProperties.py --- software-properties-0.92.37.3/softwareproperties/SoftwareProperties.py 2015-01-19 15:08:01.000000000 +0000 +++ software-properties-0.92.37.4/softwareproperties/SoftwareProperties.py 2015-07-07 07:52:41.000000000 +0000 @@ -795,8 +795,6 @@ def add_key(self, path): """Add a gnupg key to the list of trusted software vendors""" - if not isinstance(path, str): - path = str(path) # allows non-ascii filenames if not os.path.exists(path): return False try: @@ -807,9 +805,9 @@ return False def add_key_from_data(self, keydata): - "Add a gnupg key from a data string (e.g. copy-n-paste)" + "Add a gnupg key from a utf-8 data string (e.g. copy-n-paste)" tmp = tempfile.NamedTemporaryFile() - tmp.write(keydata.encode()) + tmp.write(keydata.encode("utf-8")) tmp.flush() return self.add_key(tmp.name)