Merge lp:~dobey/ubuntuone-client/installer-not-panel into lp:ubuntuone-client

Proposed by dobey on 2012-02-29
Status: Merged
Approved by: dobey on 2012-03-01
Approved revision: 1199
Merged at revision: 1198
Proposed branch: lp:~dobey/ubuntuone-client/installer-not-panel
Merge into: lp:ubuntuone-client
Diff against target: 106 lines (+13/-37)
2 files modified
tests/platform/linux/test_messaging.py (+1/-6)
ubuntuone/platform/linux/messaging.py (+12/-31)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/installer-not-panel
Reviewer Review Type Date Requested Status
Natalia Bidart 2012-02-29 Approve on 2012-03-01
Roberto Alsina (community) Approve on 2012-03-01
Review via email: mp+95237@code.launchpad.net

Commit Message

Update the messaging indicator integration to launch ubuntuone-installer
Avoid passing time() to the Indicator API which expects GTimeVal now
Update the tests for the changes

To post a comment you must log in.
Roberto Alsina (ralsina) wrote :

+1

review: Approve
Natalia Bidart (nataliabidart) wrote :

I'm getting this

===============================================================================
[ERROR]
Traceback (most recent call last):
Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug)
<DelayedCall 0x6dad050 [0.0997607707977s] called=0 cancelled=0 GIReactor.callFromThread(<bound method C.push of <tests.syncdaemon.test_hashqueue.C object at 0x6d9a390>>, 'HQ_HASH_ERROR', mdid='mdid')>

tests.syncdaemon.test_hashqueue.HashQueueTests.test_being_hashed

does not seem related... but perhaps you know why I'm getting that?

review: Needs Information
Natalia Bidart (nataliabidart) wrote :

Seems like the test us buggy, see bug #935568. Looks good!

review: Approve
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (239.4 KiB)

The attempt to merge lp:~dobey/ubuntuone-client/installer-not-panel into lp:ubuntuone-client failed. Below is the output from the failed tests.

/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.68
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.3
checking for libtool >= 1.5...
  testing libtoolize... found 2.4.2
checking for intltool >= 0.30...
  testing intltoolize... found 0.50.1
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.26
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.18
Checking for required M4 macros...
Checking for forbidden M4 macros...
Processing ./configure.ac
Running libtoolize...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running intltoolize...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-gtk-doc --enable-debug ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how ...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/platform/linux/test_messaging.py'
2--- tests/platform/linux/test_messaging.py 2012-01-25 22:42:17 +0000
3+++ tests/platform/linux/test_messaging.py 2012-02-29 18:58:21 +0000
4@@ -83,12 +83,7 @@
5 if message_count is not None:
6 mock_indicator.set_property("count", str(message_count))
7 else:
8- if message_time is None:
9- mock_time = self.mocker.replace("time.time")
10- mock_time()
11- self.mocker.result(FAKE_TIME2)
12- mock_indicator.set_property_time("time", FAKE_TIME2)
13- else:
14+ if message_time is not None:
15 mock_indicator.set_property_time("time", message_time)
16 mock_indicator.set_property("draw-attention", "true")
17 if update_count:
18
19=== modified file 'ubuntuone/platform/linux/messaging.py'
20--- ubuntuone/platform/linux/messaging.py 2012-01-26 18:09:46 +0000
21+++ ubuntuone/platform/linux/messaging.py 2012-02-29 18:58:21 +0000
22@@ -21,20 +21,20 @@
23 # of them are available, we should fall back to silently discarding
24 # messages.
25
26-import dbus
27-import subprocess
28 import sys
29
30-from time import time
31-
32 indicate = None
33+glib = None
34 if 'gobject' in sys.modules and sys.modules['gobject'] is not None:
35 import indicate as pyindicate
36+ import glib as GLib
37 indicate = pyindicate
38+ glib = GLib
39 using_gi = False
40 else:
41- from gi.repository import Indicate
42+ from gi.repository import Indicate, GLib
43 indicate = Indicate
44+ glib = GLib
45 using_gi = True
46
47 DBUS_BUS_NAME = 'com.ubuntuone.controlpanel.gui'
48@@ -43,34 +43,15 @@
49 TRANSLATION_DOMAIN = 'ubuntuone-control-panel'
50
51 from ubuntuone.status.messaging import AbstractMessaging
52-from ubuntuone.status.logger import logger
53-
54-
55-# pylint: disable=W0613
56+
57+
58 def open_volumes():
59 """Open the control panel to the shares tab."""
60- bus = dbus.SessionBus()
61- obj = bus.get_object(DBUS_BUS_NAME, DBUS_PATH)
62- service = dbus.Interface(obj, dbus_interface=DBUS_IFACE_GUI)
63-
64- def error_handler(*args, **kwargs):
65- """Log errors when calling D-Bus methods in a async way."""
66- logger.error(
67- 'Dbus call to com.ubuntuone.controlpanel.gui failed: %r %r', args,
68- kwargs)
69-
70- def reply_handler(*args, **kwargs):
71- """Exit when done."""
72- pass
73-
74- service.switch_to_alert(
75- 'volumes', True, reply_handler=reply_handler,
76- error_handler=error_handler)
77-
78+ _server_callback(None)
79
80 def _server_callback(the_indicator, message_time=None):
81 """Open the control panel to the shares tab."""
82- subprocess.Popen(['ubuntuone-control-panel-gtk'])
83+ glib.spawn_command_line_async('ubuntuone-installer')
84 # pylint: enable=W0613
85
86
87@@ -78,6 +59,7 @@
88 """Notification of the end user."""
89
90 def __init__(self, server_callback=_server_callback):
91+ self.server_callback = server_callback
92 self.indicators = []
93 if using_gi:
94 self.server = indicate.Server.ref_default()
95@@ -107,9 +89,8 @@
96 if message_count is not None:
97 indicator.set_property("count", str(message_count))
98 else:
99- if message_time is None:
100- message_time = time()
101- indicator.set_property_time("time", message_time)
102+ if message_time is not None:
103+ indicator.set_property_time("time", message_time)
104 indicator.set_property("draw-attention", "true")
105 indicator.show()
106 self.indicators.append(indicator)

Subscribers

People subscribed via source and target branches