Merge lp:~brunonova/software-properties/lp1383289 into lp:software-properties

Proposed by Bruno Nova on 2014-10-20
Status: Merged
Merged at revision: 920
Proposed branch: lp:~brunonova/software-properties/lp1383289
Merge into: lp:software-properties
Diff against target: 28 lines (+3/-3)
2 files modified
softwareproperties/ (+2/-2)
softwareproperties/gtk/ (+1/-1)
To merge this branch: bzr merge lp:~brunonova/software-properties/lp1383289
Reviewer Review Type Date Requested Status
Michael Vogt 2014-10-20 Approve on 2014-11-21
Review via email:

Description of the change

Dragging a key into the list of keys in the "Authentication" tab fails. This commit fixes this.
I tested only the GTK version! I don't know if the problem exists in the KDE one!

Note: in softwareproperties/gtk/, I replaced one occurrence of "" by "selection.get_data().strip()".
But there is another occurrence of "" in that file, which is not used here. I haven't touched it because I am not sure if "selection" there is also of type "SelectionData". If it is, then that occurrence should be corrected as well!

To post a comment you must log in.
Michael Vogt (mvo) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'softwareproperties/'
--- softwareproperties/ 2014-09-24 09:50:37 +0000
+++ softwareproperties/ 2014-10-20 14:19:54 +0000
@@ -811,9 +811,9 @@
811 def add_key_from_data(self, keydata):811 def add_key_from_data(self, keydata):
812 "Add a gnupg key from a data string (e.g. copy-n-paste)"812 "Add a gnupg key from a data string (e.g. copy-n-paste)"
813 tmp = tempfile.NamedTemporaryFile()813 tmp = tempfile.NamedTemporaryFile()
814 tmp.write(keydata.encode())814 tmp.write(keydata)
815 tmp.flush()815 tmp.flush()
816 return self.add_key( return self.backend.AddKey(
818 def remove_key(self, keyid):818 def remove_key(self, keyid):
819 """Remove a gnupg key from the list of trusted software vendors"""819 """Remove a gnupg key from the list of trusted software vendors"""
=== modified file 'softwareproperties/gtk/'
--- softwareproperties/gtk/ 2014-01-10 11:23:05 +0000
+++ softwareproperties/gtk/ 2014-10-20 14:19:54 +0000
@@ -756,7 +756,7 @@
756 def on_auth_drag_data_received(self, widget, context, x, y,756 def on_auth_drag_data_received(self, widget, context, x, y,
757 selection, target_type, timestamp):757 selection, target_type, timestamp):
758 """Extract the dropped key and add it to the keyring"""758 """Extract the dropped key and add it to the keyring"""
759 keydata = keydata = selection.get_data().strip()
760 if not self.add_key_from_data(keydata):760 if not self.add_key_from_data(keydata):
761 error(self.window_main,761 error(self.window_main,
762 _("Error importing key"),762 _("Error importing key"),


People subscribed via source and target branches

to status/vote changes: