[Bug 1795278] Re: software-properties-{qt, kde} attempts to use KUrl but it doesn't exist

Hans P. Möller 1795278 at bugs.launchpad.net
Thu Mar 5 01:29:33 UTC 2020


this should be the diff to be tested:

diff --git a/softwareproperties/qt/SoftwarePropertiesQt.py b/softwareproperties/qt/SoftwarePropertiesQt.py
index 8172e25..b210323 100644
--- a/softwareproperties/qt/SoftwarePropertiesQt.py
+++ b/softwareproperties/qt/SoftwarePropertiesQt.py
@@ -709,8 +709,7 @@ class SoftwarePropertiesQt(SoftwareProperties):
     home = QDir.homePath()
     if "SUDO_USER" in os.environ:
         home = os.path.expanduser("~%s" % os.environ["SUDO_USER"])
-    url = KUrl.fromPath(home)
-    filename = KFileDialog.getOpenFileName(url, 'application/pgp-keys', self.userinterface, _("Import key"))
+    filename = QFileDialog.getOpenFileName(self.userinterface, _("Import key"), home, 'application/pgp-keys')
     if filename:
       if not self.add_key(filename):
         title = _("Error importing selected file")

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/1795278

Title:
  software-properties-{qt,kde} attempts to use KUrl but it doesn't exist

Status in software-properties package in Ubuntu:
  Triaged

Bug description:
  Release: Kubuntu 18.04
  Version: 0.96.24.32.1

  When clicking the "Import Key" button in the "Authentication" section
  of the panel it throws this error:

      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/softwareproperties/kde/SoftwarePropertiesKDE.py", line 667, in add_key_clicked
          url = KUrl.fromPath(home)
      NameError: name 'KUrl' is not defined

  While this doesn't crash the program it causes nothing to happen when
  clicking the button. Running the program in a terminal reveals the
  error being printed to stderr.

  After debugging it appears KUrl doesn't exist anywhere and I'm not
  sure if's a python module that has changed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1795278/+subscriptions



More information about the foundations-bugs mailing list