Merge lp:~facundo/ubuntuone-client/clean-aq-download-cancelled into lp:ubuntuone-client

Proposed by Facundo Batista
Status: Merged
Approved by: Facundo Batista
Approved revision: 912
Merged at revision: 912
Proposed branch: lp:~facundo/ubuntuone-client/clean-aq-download-cancelled
Merge into: lp:ubuntuone-client
Diff against target: 97 lines (+1/-39)
5 files modified
tests/platform/linux/test_dbus.py (+0/-20)
ubuntuone/syncdaemon/action_queue.py (+1/-6)
ubuntuone/syncdaemon/event_queue.py (+0/-1)
ubuntuone/syncdaemon/interaction_interfaces.py (+0/-5)
ubuntuone/syncdaemon/sync.py (+0/-7)
To merge this branch: bzr merge lp:~facundo/ubuntuone-client/clean-aq-download-cancelled
Reviewer Review Type Date Requested Status
Facundo Batista (community) Approve
Lucio Torre (community) Approve
Review via email: mp+52608@code.launchpad.net

Commit message

Removed all traces of AQ_DOWNLOAD_CANCELLED. (LP: #721479)

Description of the change

Removed all traces of AQ_DOWNLOAD_CANCELLED.

It was just unused.

To post a comment you must log in.
Revision history for this message
Lucio Torre (lucio.torre) :
review: Approve
Revision history for this message
Facundo Batista (facundo) wrote :

Approving with one review

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/platform/linux/test_dbus.py'
2--- tests/platform/linux/test_dbus.py 2011-03-02 16:55:26 +0000
3+++ tests/platform/linux/test_dbus.py 2011-03-08 20:31:48 +0000
4@@ -1698,26 +1698,6 @@
5 error='AN_ERROR')
6 return d
7
8- def test_download_cancelled(self):
9- """Test the DBus signals in Status."""
10- a_dir = os.path.join(self.root_dir, u'ñoño'.encode('utf-8'))
11- self.fs_manager.create(a_dir, "", is_dir=False)
12- self.fs_manager.set_node_id(a_dir, "node_id")
13-
14- d = defer.Deferred()
15- def download_handler(path, info):
16- """Handler for DownloadFinished signal."""
17- self.assertEquals(a_dir, path.encode('utf-8'))
18- self.assertEquals('CANCELLED', info['error'])
19- d.callback(True)
20-
21- match = self.bus.add_signal_receiver(download_handler,
22- signal_name='DownloadFinished')
23- self.signal_receivers.add(match)
24- self.main.event_q.push('AQ_DOWNLOAD_CANCELLED', share_id='',
25- node_id='node_id', server_hash='hash')
26- return d
27-
28 def test_upload_started(self):
29 """Test the DBus signals in Status."""
30 a_dir = os.path.join(self.root_dir, u'ñoño'.encode('utf-8'))
31
32=== modified file 'ubuntuone/syncdaemon/action_queue.py'
33--- ubuntuone/syncdaemon/action_queue.py 2011-03-07 16:54:25 +0000
34+++ ubuntuone/syncdaemon/action_queue.py 2011-03-08 20:31:48 +0000
35@@ -2225,12 +2225,7 @@
36
37 def handle_failure(self, failure):
38 """It didn't work! Push the event."""
39- if failure.check(protocol_errors.RequestCancelledError):
40- self.action_queue.event_queue.push('AQ_DOWNLOAD_CANCELLED',
41- share_id=self.share_id,
42- node_id=self.node_id,
43- server_hash=self.server_hash)
44- elif failure.check(protocol_errors.DoesNotExistError):
45+ if failure.check(protocol_errors.DoesNotExistError):
46 self.action_queue.event_queue.push('AQ_DOWNLOAD_DOES_NOT_EXIST',
47 share_id=self.share_id,
48 node_id=self.node_id)
49
50=== modified file 'ubuntuone/syncdaemon/event_queue.py'
51--- ubuntuone/syncdaemon/event_queue.py 2011-02-21 20:42:06 +0000
52+++ ubuntuone/syncdaemon/event_queue.py 2011-03-08 20:31:48 +0000
53@@ -51,7 +51,6 @@
54 'AQ_DOWNLOAD_COMMIT': ('share_id', 'node_id', 'server_hash'),
55 'AQ_DOWNLOAD_FINISHED': ('share_id', 'node_id', 'server_hash'),
56 'AQ_DOWNLOAD_ERROR': ('share_id', 'node_id', 'server_hash', 'error'),
57- 'AQ_DOWNLOAD_CANCELLED': ('share_id', 'node_id', 'server_hash'),
58 'AQ_DOWNLOAD_DOES_NOT_EXIST': ('share_id', 'node_id'),
59 'AQ_UPLOAD_STARTED' : ('share_id', 'node_id', 'hash'),
60 'AQ_UPLOAD_FILE_PROGRESS': ('share_id', 'node_id',
61
62=== modified file 'ubuntuone/syncdaemon/interaction_interfaces.py'
63--- ubuntuone/syncdaemon/interaction_interfaces.py 2011-03-02 16:03:16 +0000
64+++ ubuntuone/syncdaemon/interaction_interfaces.py 2011-03-08 20:31:48 +0000
65@@ -822,11 +822,6 @@
66 node_id=str(node_id))
67 self.interface.status.emit_signal_error('DownloadFinished', args)
68
69- def handle_AQ_DOWNLOAD_CANCELLED(self, share_id, node_id, server_hash):
70- """Handle AQ_DOWNLOAD_CANCELLED."""
71- self.handle_AQ_DOWNLOAD_ERROR(share_id, node_id, server_hash,
72- 'CANCELLED', 'AQ_DOWNLOAD_CANCELLED')
73-
74 def handle_AQ_DOWNLOAD_ERROR(self, share_id, node_id, server_hash, error,
75 event='AQ_DOWNLOAD_ERROR'):
76 """Handle AQ_DOWNLOAD_ERROR."""
77
78=== modified file 'ubuntuone/syncdaemon/sync.py'
79--- ubuntuone/syncdaemon/sync.py 2011-02-21 16:50:33 +0000
80+++ ubuntuone/syncdaemon/sync.py 2011-03-08 20:31:48 +0000
81@@ -873,13 +873,6 @@
82 ssmr.signal_event_with_error_and_hash("AQ_DOWNLOAD_ERROR", error,
83 server_hash)
84
85- def handle_AQ_DOWNLOAD_CANCELLED(self, share_id, node_id, server_hash):
86- """on AQ_DOWNLOAD_CANCELLED"""
87- key = FSKey(self.m.fs, share_id=share_id, node_id=node_id)
88- log = FileLogger(self.logger, key)
89- ssmr = SyncStateMachineRunner(self.fsm, self.m, key, log)
90- ssmr.signal_event_with_hash("AQ_DOWNLOAD_CANCELLED", server_hash)
91-
92 def handle_AQ_DOWNLOAD_DOES_NOT_EXIST(self, share_id, node_id):
93 """on AQ_DOWNLOAD_DOES_NOT_EXIST."""
94 key = FSKey(self.m.fs, share_id=share_id, node_id=node_id)
95
96=== modified file 'ubuntuone/syncdaemon/u1fsfsm.ods'
97Binary files ubuntuone/syncdaemon/u1fsfsm.ods 2010-09-07 20:49:38 +0000 and ubuntuone/syncdaemon/u1fsfsm.ods 2011-03-08 20:31:48 +0000 differ

Subscribers

People subscribed via source and target branches