Comment 3 for bug 1383289

Bruno Nova (brunonova) wrote :

Oh, before that there's another error:

Traceback (most recent call last):
  File "/home/bruno/src/software-properties/software-properties/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 760, in on_auth_drag_data_received
    if not self.add_key_from_data(keydata):
  File "/home/bruno/src/software-properties/software-properties/softwareproperties/SoftwareProperties.py", line 815, in add_key_from_data
    tmp.write(keydata.encode())
AttributeError: 'bytes' object has no attribute 'encode'

Just replace:
    tmp.write(keydata.encode())
with:
    tmp.write(keydata)
because keydata is already "bytes" at that point.