Code review comment for lp://qastaging/~cmiller/desktopcouch/service-must-not-call-self-over-dbus

Revision history for this message
Eric Casteleijn (thisfred) wrote :

I like the solution of explicitly passing the port where necessary.

Woohoo, no more erroring/failing tests!

I still see this in the test feedback, which looks less than ideal, but probably wholly unrelated to this branch:

desktopcouch.application.pair.tests.test_network_io
  TestNetworkIO
    test_successful_lifespan ... INFO:ListenForInvitations:local port to receive invitations is 33214
DEBUG:SendInvitationFactory:initialized
Traceback (most recent call last):
  File "/home/eric/canonical/desktopcouch/service-must-not-call-self-over-dbus/desktopcouch/application/plugins/ubuntuone_pairing.py", line 90, in listen_to_dbus
    dbus_interface=iface)
  File "/usr/lib/pymodules/python2.6/dbus/bus.py", line 151, in add_signal_receiver
    path, **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 382, in add_signal_receiver
    self._require_main_loop()
RuntimeError: To make asynchronous calls, receive signals or export objects, D-Bus connections must be attached to a main loop by passing mainloop=... to the constructor or calling dbus.set_default_main_loop(...)
Traceback (most recent call last):
  File "/home/eric/canonical/desktopcouch/service-must-not-call-self-over-dbus/desktopcouch/application/plugins/ubuntuone_pairing.py", line 90, in listen_to_dbus
    dbus_interface=iface)
  File "/usr/lib/pymodules/python2.6/dbus/bus.py", line 151, in add_signal_receiver
    path, **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 382, in add_signal_receiver
    self._require_main_loop()
RuntimeError: To make asynchronous calls, receive signals or export objects, D-Bus connections must be attached to a main loop by passing mainloop=... to the constructor or calling dbus.set_default_main_loop(...)
DEBUG:SendInvitationProtocol:initialized

I see these pep8 issues also, but I believe most if not all have been fixed on trunk, so remerging should take care of that:

./desktopcouch/application/service.py:160:26: E261 at least two spaces before inline comment
./desktopcouch/application/start_local_couchdb.py:117:1: E302 expected 2 blank lines, found 1
./desktopcouch/application/platform/windows/base_dirs.py:38:74: W291 trailing whitespace
./desktopcouch/application/platform/windows/base_dirs.py:48:18: W291 trailing whitespace
./desktopcouch/application/platform/windows/base_dirs.py:62:18: W291 trailing whitespace
./desktopcouch/application/platform/windows/base_dirs.py:76:24: E211 whitespace before '['
./desktopcouch/application/platform/windows/base_dirs.py:78:37: E211 whitespace before '['
./desktopcouch/application/platform/windows/base_dirs.py:80:24: E211 whitespace before '['
./desktopcouch/application/platform/windows/keyring.py:160:48: W291 trailing whitespace
./desktopcouch/application/platform/windows/keyring.py:168:68: W292 no newline at end of file
./desktopcouch/application/platform/windows/tests/test_base_dirs.py:90:1: W391 blank line at end of file
./desktopcouch/application/plugins/ubuntuone_pairing.py:88:59: W291 trailing whitespace
./desktopcouch/application/replication_services/ubuntuone.py:66:51: W291 trailing whitespace
./desktopcouch/application/replication_services/ubuntuone.py:67:31: W291 trailing whitespace
./desktopcouch/application/tests/test_service.py:155:1: W291 trailing whitespace
./desktopcouch/records/tests/test_mocked_server.py:399:70: W291 trailing whitespace

review: Approve

« Back to merge proposal