Bug#546837: Some progress constructing the command correctly

Dominique Brazziel dbrazziel at snet.net
Thu May 20 19:18:49 UTC 2010


After changing 'owner_pi' to 'owner_pid' and then
converting it to a string like so:

	LOG.debug('pi.owner_uid is %s', str(pi.owner_uid))
	struid = str(pi.owner_uid)
	command = ['sudo', '-u#' + struid, command]

I get a crash when trying to execute the command:


 DEBUG:UpdateManager.Util.procesinfo] Proc: <ProcessInfo(pid=26063,
name=sh, owner_uid=0, parent_pid=26059)
[   DEBUG:UpdateManager.Util.procesinfo] Proc: <ProcessInfo(pid=26059,
name=gksu-run-helper, owner_uid=0, parent_pid=26049)
[   DEBUG:UpdateManager.Util.procesinfo] Proc: <ProcessInfo(pid=26049,
name=su, owner_uid=0, parent_pid=26044)
[   DEBUG:UpdateManager.Util.procesinfo] Proc: <ProcessInfo(pid=26044,
name=gksu, owner_uid=1000, parent_pid=26039)
[   DEBUG:UpdateManager.Util.procesinfo] pi.owner_uid is 1000
[   DEBUG:UpdateManager.Util.procesinfo] command = ['sudo', '-u#1000',
['gnome-open', u'http://bugs.debian.org/581235']]  <== Note extra 'u'
before URL
[   DEBUG:UpdateManager.BugHandler] Bug script name: debian_reportbug.sh
[   DEBUG:UpdateManager.Frontend.GtkCommon.GtkExceptionHandler]
Exception detected: type=<type 'exceptions.TypeError'>,value=execv() arg
2 must contain only strings,tb=<traceback object at
0x9bd9a2c>,origin=<_MainThread(MainThread, started)>
[   DEBUG:UpdateManager.Frontend.GtkCommon.GtkExceptionHandler] Starting
subprocess...

I'll take a break and resume my toils later.   







More information about the pkg-gnome-maintainers mailing list