Merge lp:~seif/zeitgeist/fix-691167 into lp:zeitgeist/0.1

Proposed by Seif Lotfy
Status: Rejected
Rejected by: Siegfried Gevatter
Proposed branch: lp:~seif/zeitgeist/fix-691167
Merge into: lp:zeitgeist/0.1
Diff against target: 98 lines (+17/-12)
1 file modified
_zeitgeist/engine/remote.py (+17/-12)
To merge this branch: bzr merge lp:~seif/zeitgeist/fix-691167
Reviewer Review Type Date Requested Status
Siegfried Gevatter Needs Fixing
Review via email: mp+60125@code.launchpad.net

Description of the change

Fix for 691167

To post a comment you must log in.
Revision history for this message
Siegfried Gevatter (rainct) wrote :

I don't see where you're using bytearray here. According to [0], this byte_array=True thing is to request something unrelated (a different ByteArray class which is part of python-dbus and is a subclass of string).

[0] http://dbus.freedesktop.org/doc/dbus-python/api/dbus.ByteArray-class.html

review: Needs Fixing

Unmerged revisions

1750. By Seif Lotfy

add byte_arrays=True to dbus signals and methods for which gives us the simple mapping dbus.ByteArray <-> str
Fix indents

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '_zeitgeist/engine/remote.py'
2--- _zeitgeist/engine/remote.py 2011-04-11 18:13:58 +0000
3+++ _zeitgeist/engine/remote.py 2011-05-05 21:42:28 +0000
4@@ -84,7 +84,7 @@
5 @dbus.service.method(constants.DBUS_INTERFACE,
6 in_signature="au",
7 out_signature="a("+constants.SIG_EVENT+")",
8- sender_keyword="sender")
9+ sender_keyword="sender", byte_arrays=True)
10 def GetEvents(self, event_ids, sender):
11 """Get full event data for a set of event IDs
12
13@@ -101,11 +101,11 @@
14 :rtype: A list of serialized events. DBus signature a(asaasay).
15 """
16 return self._make_events_sendable(self._engine.get_events(ids=event_ids,
17- sender=sender))
18+ sender=sender))
19
20 @dbus.service.method(constants.DBUS_INTERFACE,
21 in_signature="(xx)a("+constants.SIG_EVENT+")a("+constants.SIG_EVENT+")uuu",
22- out_signature="as")
23+ out_signature="as", byte_arrays=True)
24 def FindRelatedUris(self, time_range, event_templates,
25 result_event_templates, storage_state, num_events, result_type):
26 """Warning: This API is EXPERIMENTAL and is not fully supported yet.
27@@ -153,7 +153,8 @@
28
29 @dbus.service.method(constants.DBUS_INTERFACE,
30 in_signature="(xx)a("+constants.SIG_EVENT+")uuu",
31- out_signature="au")
32+ out_signature="au",
33+ byte_arrays=True)
34 def FindEventIds(self, time_range, event_templates, storage_state,
35 num_events, result_type):
36 """Search for events matching a given set of templates and return
37@@ -217,7 +218,8 @@
38 @dbus.service.method(constants.DBUS_INTERFACE,
39 in_signature="(xx)a("+constants.SIG_EVENT+")uuu",
40 out_signature="a("+constants.SIG_EVENT+")",
41- sender_keyword="sender")
42+ sender_keyword="sender",
43+ byte_arrays=True)
44 def FindEvents(self, time_range, event_templates, storage_state,
45 num_events, result_type, sender):
46 """Get events matching a given set of templates.
47@@ -275,7 +277,8 @@
48 @dbus.service.method(constants.DBUS_INTERFACE,
49 in_signature="a("+constants.SIG_EVENT+")",
50 out_signature="au",
51- sender_keyword="sender")
52+ sender_keyword="sender",
53+ byte_arrays=True)
54 def InsertEvents(self, events, sender):
55 """Inserts events into the log. Returns an array containing the IDs
56 of the inserted events
57@@ -324,9 +327,9 @@
58 return event_ids
59
60 @dbus.service.method(constants.DBUS_INTERFACE,
61- in_signature="au",
62- out_signature="(xx)",
63- sender_keyword="sender")
64+ in_signature="au",
65+ out_signature="(xx)",
66+ sender_keyword="sender")
67 def DeleteEvents(self, event_ids, sender):
68 """Delete a set of events from the log given their IDs
69
70@@ -339,7 +342,7 @@
71 # We need to check the return value, as the events could already
72 # have been deleted before or the IDs might even have been invalid.
73 self._notifications.notify_delete(
74- TimeRange(timestamps[0], timestamps[1]), event_ids)
75+ TimeRange(timestamps[0], timestamps[1]), event_ids)
76 if timestamps is None:
77 # unknown event id, see doc of delete_events()
78 return (-1, -1)
79@@ -348,7 +351,8 @@
80 timestamp_end = timestamp_end if timestamp_end is not None else -1
81 return (timestamp_start, timestamp_end)
82
83- @dbus.service.method(constants.DBUS_INTERFACE, in_signature="", out_signature="")
84+ @dbus.service.method(constants.DBUS_INTERFACE, in_signature="", out_signature=""
85+ )
86 def DeleteLog(self):
87 """Delete the log file and all its content
88
89@@ -430,7 +434,8 @@
90 # Notifications interface
91
92 @dbus.service.method(constants.DBUS_INTERFACE,
93- in_signature="o(xx)a("+constants.SIG_EVENT+")", sender_keyword="owner")
94+ in_signature="o(xx)a("+constants.SIG_EVENT+")", sender_keyword="owner",
95+ byte_arrays=True)
96 def InstallMonitor(self, monitor_path, time_range, event_templates, owner=None):
97 """Register a client side monitor object to receive callbacks when
98 events matching *time_range* and *event_templates* are inserted or

Subscribers

People subscribed via source and target branches