=== modified file 'softwareproperties/SoftwareProperties.py'
--- softwareproperties/SoftwareProperties.py	2013-10-16 16:20:43 +0000
+++ softwareproperties/SoftwareProperties.py	2015-02-12 16:47:35 +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)
 

=== modified file 'softwareproperties/gtk/SoftwarePropertiesGtk.py'
--- softwareproperties/gtk/SoftwarePropertiesGtk.py	2014-01-10 12:23:07 +0000
+++ softwareproperties/gtk/SoftwarePropertiesGtk.py	2015-02-12 16:47:35 +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:

