Merge lp:~nataliabidart/ubuntuone-control-panel/no-log into lp:ubuntuone-control-panel

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 52
Merged at revision: 52
Proposed branch: lp:~nataliabidart/ubuntuone-control-panel/no-log
Merge into: lp:ubuntuone-control-panel
Diff against target: 62 lines (+10/-4)
2 files modified
ubuntuone/controlpanel/gtk/gui.py (+4/-2)
ubuntuone/controlpanel/logger.py (+6/-2)
To merge this branch: bzr merge lp:~nataliabidart/ubuntuone-control-panel/no-log
Reviewer Review Type Date Requested Status
Roman Yepishev (community) fieldtest Approve
Roberto Alsina (community) Approve
Martin Albisetti (community) Approve
Review via email: mp+47255@code.launchpad.net

Commit message

No more token info logged (LP: #706906).

To post a comment you must log in.
Revision history for this message
Martin Albisetti (beuno) :
review: Approve
Revision history for this message
Roberto Alsina (ralsina) wrote :

+1

review: Approve
Revision history for this message
Roman Yepishev (rye) wrote :

Yep, my precious credentials are no longer logged

review: Approve (fieldtest)
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (8.0 KiB)

The attempt to merge lp:~nataliabidart/ubuntuone-control-panel/no-log into lp:ubuntuone-control-panel failed. Below is the output from the failed tests.

Running test suite for ubuntuone/controlpanel/tests
ubuntuone.controlpanel.tests.test_backend
  BackendAccountTestCase
    test_account_info ... [OK]
    test_account_info_fails ... [OK]
    test_account_info_with_current_plan ... [OK]
    test_backend_creation ... [OK]
    test_device_is_local ... [OK]
    test_get_token ... [OK]
  BackendBasicTestCase
    test_backend_creation ... [OK]
    test_device_is_local ... [OK]
    test_get_token ... [OK]
  BackendDevicesTestCase
    test_backend_creation ... [OK]
    test_change_download_speed_limit ... [OK]
    test_change_limit_bandwidth ... [OK]
    test_change_upload_speed_limit ... [OK]
    test_changing_settings_for_wrong_id_has_no_effect ... [OK]
    test_device_is_local ... [OK]
    test_devices_info ... [OK]
    test_devices_info_fails ... [OK]
    test_get_token ... [OK]
    test_remove_device ... [OK]
    test_remove_device_clear_credentials_if_local_device ... [OK]
    test_remove_device_fails ... [OK]
  BackendFileSyncOpsTestCase
    test_backend_creation ... [OK]
    test_connect_files ... [OK]
    test_device_is_local ... [OK]
    test_disable_files ... [OK]
    test_disconnect_files ... [OK]
    test_enable_files ... [OK]
    test_get_token ... [OK]
    test_restart_files ... [OK]
    test_start_files ... [OK]
    test_stop_files ... [OK]
  BackendReplicationsTestCase
    test_backend_creation ... [OK]
    test_change_replication_settings ... [OK]
    test_change_replication_settings_no_setting ... [OK]
    test_change_replication_settings_not_in_replications ... [OK]
    test_device_is_l...

Read more...

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (8.0 KiB)

The attempt to merge lp:~nataliabidart/ubuntuone-control-panel/no-log into lp:ubuntuone-control-panel failed. Below is the output from the failed tests.

Running test suite for ubuntuone/controlpanel/tests
ubuntuone.controlpanel.tests.test_backend
  BackendAccountTestCase
    test_account_info ... [OK]
    test_account_info_fails ... [OK]
    test_account_info_with_current_plan ... [OK]
    test_backend_creation ... [OK]
    test_device_is_local ... [OK]
    test_get_token ... [OK]
  BackendBasicTestCase
    test_backend_creation ... [OK]
    test_device_is_local ... [OK]
    test_get_token ... [OK]
  BackendDevicesTestCase
    test_backend_creation ... [OK]
    test_change_download_speed_limit ... [OK]
    test_change_limit_bandwidth ... [OK]
    test_change_upload_speed_limit ... [OK]
    test_changing_settings_for_wrong_id_has_no_effect ... [OK]
    test_device_is_local ... [OK]
    test_devices_info ... [OK]
    test_devices_info_fails ... [OK]
    test_get_token ... [OK]
    test_remove_device ... [OK]
    test_remove_device_clear_credentials_if_local_device ... [OK]
    test_remove_device_fails ... [OK]
  BackendFileSyncOpsTestCase
    test_backend_creation ... [OK]
    test_connect_files ... [OK]
    test_device_is_local ... [OK]
    test_disable_files ... [OK]
    test_disconnect_files ... [OK]
    test_enable_files ... [OK]
    test_get_token ... [OK]
    test_restart_files ... [OK]
    test_start_files ... [OK]
    test_stop_files ... [OK]
  BackendReplicationsTestCase
    test_backend_creation ... [OK]
    test_change_replication_settings ... [OK]
    test_change_replication_settings_no_setting ... [OK]
    test_change_replication_settings_not_in_replications ... [OK]
    test_device_is_l...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/controlpanel/gtk/gui.py'
2--- ubuntuone/controlpanel/gtk/gui.py 2011-01-21 19:13:45 +0000
3+++ ubuntuone/controlpanel/gtk/gui.py 2011-01-24 13:18:35 +0000
4@@ -419,7 +419,7 @@
5 self.warning_label.set_text('')
6
7 @filter_by_app_name
8- @log_call(logger.info)
9+ @log_call(logger.info, with_args=False)
10 def on_credentials_found(self, app_name, credentials):
11 """SSO backend notifies of credentials found."""
12 self.set_property('greyed', False)
13@@ -758,7 +758,7 @@
14 }
15 return result
16
17- @log_call(logger.info)
18+ @log_call(logger.info, with_args=False)
19 def on_device_settings_changed(self, device_id):
20 """The change of this device settings succeded."""
21 if device_id != self.id:
22@@ -776,6 +776,7 @@
23 self._set_warning(self.DEVICE_CHANGE_ERROR, self.warning_label)
24 self.set_sensitive(True)
25
26+ # is safe to log the device_id since it was already removed
27 @log_call(logger.warning)
28 def on_device_removed(self, device_id):
29 """The removal of this device succeded."""
30@@ -814,6 +815,7 @@
31 self.backend.connect_to_signal('DeviceRemoved',
32 self.on_device_removed)
33
34+ @log_call(logger.info, with_args=False)
35 def on_devices_info_ready(self, info):
36 """Backend notifies of devices info."""
37 for child in self.devices.get_children():
38
39=== modified file 'ubuntuone/controlpanel/logger.py'
40--- ubuntuone/controlpanel/logger.py 2011-01-04 21:01:57 +0000
41+++ ubuntuone/controlpanel/logger.py 2011-01-24 13:18:35 +0000
42@@ -59,7 +59,7 @@
43 return logger
44
45
46-def log_call(log_func):
47+def log_call(log_func, with_args=True):
48 """Decorator to add log info using 'log_func'."""
49
50 def middle(f):
51@@ -68,7 +68,11 @@
52 @wraps(f)
53 def inner(*args, **kwargs):
54 """Call f(*args, **kwargs)."""
55- log_func('%s: args %r, kwargs %r.', f.__name__, args, kwargs)
56+ if with_args:
57+ log_func('%s: args %r, kwargs %r.', f.__name__, args, kwargs)
58+ else:
59+ log_func('%s.', f.__name__)
60+
61 res = f(*args, **kwargs)
62 return res
63

Subscribers

People subscribed via source and target branches