Merge lp:~alecu/ubuntuone-client/fix-tunnel-runner-windows into lp:ubuntuone-client

Proposed by Alejandro J. Cura
Status: Merged
Approved by: Brian Curtin
Approved revision: 1217
Merged at revision: 1217
Proposed branch: lp:~alecu/ubuntuone-client/fix-tunnel-runner-windows
Merge into: lp:ubuntuone-client
Prerequisite: lp:~alecu/ubuntuone-client/stop-proxy-tunnel
Diff against target: 32 lines (+11/-0)
2 files modified
tests/syncdaemon/test_tunnel_runner.py (+8/-0)
ubuntuone/syncdaemon/tunnel_runner.py (+3/-0)
To merge this branch: bzr merge lp:~alecu/ubuntuone-client/fix-tunnel-runner-windows
Reviewer Review Type Date Requested Status
Brian Curtin (community) Approve
Diego Sarmentero (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+99463@code.launchpad.net

Commit message

- reactor.spawnProcess throws an error on windows if it can't find the binary to run (LP: #965897).

Description of the change

- reactor.spawnProcess throws an error on windows if it can't find the binary to run (LP: #965897).

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

I like it!

review: Approve
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
Revision history for this message
Brian Curtin (brian.curtin) wrote :

In a slightly more convoluted way, I covered the same case yesterday in https://code.launchpad.net/~brian.curtin/ubuntuone-client/tunnelrunner-mishaps revs 1218 and 1219.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/syncdaemon/test_tunnel_runner.py'
2--- tests/syncdaemon/test_tunnel_runner.py 2012-03-27 03:44:19 +0000
3+++ tests/syncdaemon/test_tunnel_runner.py 2012-03-27 03:44:19 +0000
4@@ -47,6 +47,14 @@
5 client = yield tr.get_client()
6 self.assertEqual(client, reactor)
7
8+ @defer.inlineCallbacks
9+ def test_executable_not_found(self):
10+ """The executable is not found anywhere."""
11+ self.patch(tunnel_runner, "TUNNEL_EXECUTABLE", "this_does_not_exist")
12+ tr = tunnel_runner.TunnelRunner(FAKE_HOST, FAKE_PORT)
13+ client = yield tr.get_client()
14+ self.assertEqual(client, reactor)
15+
16
17 class FakeProcessTransport(object):
18 """A fake ProcessTransport."""
19
20=== modified file 'ubuntuone/syncdaemon/tunnel_runner.py'
21--- ubuntuone/syncdaemon/tunnel_runner.py 2012-03-27 03:44:19 +0000
22+++ ubuntuone/syncdaemon/tunnel_runner.py 2012-03-27 03:44:19 +0000
23@@ -39,6 +39,9 @@
24 except ImportError:
25 logger.info("Proxy support not installed.")
26 self.client_d.callback(reactor)
27+ except Exception:
28+ logger.exception("Error while starting tunnel process:")
29+ self.client_d.callback(reactor)
30
31 def start_process(self, host, port):
32 """Start the tunnel process."""

Subscribers

People subscribed via source and target branches