After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 587713 - exception is raised in PK as get_role_localised_present_from_enum returns None not a string
exception is raised in PK as get_role_localised_present_from_enum returns Non...
Status: RESOLVED OBSOLETE
Product: gnome-packagekit
Classification: Core
Component: general
git master
Other All
: Normal critical
: ---
Assigned To: gnome-packagekit-maint
gnome-packagekit-maint
Depends on:
Blocks:
 
 
Reported: 2009-07-03 22:02 UTC by muayyad alsadi
Modified: 2014-08-06 14:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description muayyad alsadi 2009-07-03 22:02:45 UTC
Steps to reproduce:
import packagekit.gtkwidgets
pk=packagekit.gtkwidgets.PackageKitInstaller()
pk.install_by_name('minbar',True)


Stack trace:
Actual results:
Traceback (most recent call last):
  • File "/opt/proj/occ/OjubaControlCenter/widgets.py", line 79 in __clicked
    try: r=_pk.install(self.__pkgs, True)
  • File "/usr/lib/python2.6/site-packages/packagekit/gtkwidgets.py", line 637 in install
    ret = self._progress.run()
  • File "/usr/lib/python2.6/site-packages/packagekit/gtkwidgets.py", line 336 in run
    self.set_title(role)
TypeError: GtkWindow.set_title() argument 1 must be string, not None



Other information:
I suggest that all such functions fall back to '' instead of None, like this

def get_role_localised_present_from_enum(enum):
   if PRESENT_ROLE.has_key(enum):
       return PRESENT_ROLE[enum]
   else:
       return ''
Comment 1 Richard Hughes 2014-08-06 14:22:23 UTC
I'm not spending much more developer time on gnome-packagekit, see gnome-software instead. Sorry.