Bug#546837: The 'pi.owner_id' needs to be cast to a string

Dominique Brazziel dbrazziel at snet.net
Mon May 24 22:00:54 UTC 2010


You may have hit this already, but if not:

	From these lines in 'processinfo.py':

		self._owner_uid = int(data[1])
		
		def owner_uid(self):
		        """ Process owner UID """
        		return self._owner_uid

The 'pi.owner_uid' can't be concatenated to the string
'-u#', so this line in ChangelogViewer.py fails:

	command = ['sudo', '-u#' + pi.owner_uid...

Stripped down patch is -

--- ChangelogViewer.py.save	2010-05-24 17:07:33.000000000 -0400
+++ ChangelogViewer.py	2010-05-24 17:23:32.000000000 -0400
@@ -227,7 +227,8 @@
         if os.getuid() == 0:
             pi = find_nonroot_parent()
             if pi:
-                command = ['sudo', '-u#' + pi.owner_ui, command]
+        	struid = str(pi.owner_uid)
+                command = ['sudo', '-u#' + struid] + command
             else:
                 LOG.fatal('Could not detect original user.')
                 return


		







More information about the pkg-gnome-maintainers mailing list