Comment 3 for bug 691167

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Markus,
I got this when trying to work on the new blacklist API.

So you need to run the daemon from this branch.
lp:~manishsinha/zeitgeist/reproduce-691167

and then need to run the following commands on the python console
>>> sub = Subject.new_for_values()
>> ev = Event.new_for_values(actor="application://foo.desktop", subjects=[sub,])
>>> obj=dbus.SessionBus().get_object("org.gnome.zeitgeist.Engine","/org/gnome/zeitgeist/blacklist")
>>> iface=dbus.Interface(obj, "org.gnome.zeitgeist.Blacklist")
>>> blk= map(Event.new_for_struct,iface.GetBlacklist())
>>> blk.append(ev)
>>> iface.SetBlacklist(blk, "foo")

Then go and check the console. You would get the output like

Event([dbus.Array([u'', u'1292500628312', u'', u'', u'application://foo.desktop'], signature=dbus.Signature('s')), [Subject([u'', u'', u'', u'', u'', u'', u''])], dbus.Array([], signature=dbus.Signature('y'))])
{'foo': [[[u'', u'1292500628312', u'', u'', u'application://foo.desktop'], [[u'', u'', u'', u'', u'', u'', u'']], "dbus.Array([], signature=dbus.Signature('y'))"]]}
[2010-12-16 21:32:44,249] - DEBUG - zeitgeist.blacklist - Blacklist updated: {'foo':
 [[[u'', u'1292500628312', u'', u'', u'application://foo.desktop'], [[u'', u'', u'', u'', u'', u'', u'']], "dbus.Array([], signature=dbus.Signature('y'))"]]}