Merge lp:~brendan-donegan/checkbox/bug1064425 into lp:checkbox

Proposed by Brendan Donegan
Status: Merged
Approved by: Marc Tardif
Approved revision: 1754
Merged at revision: 1755
Proposed branch: lp:~brendan-donegan/checkbox/bug1064425
Merge into: lp:checkbox
Diff against target: 28 lines (+4/-2)
2 files modified
debian/changelog (+2/-0)
scripts/network_reconnect_resume_test (+2/-2)
To merge this branch: bzr merge lp:~brendan-donegan/checkbox/bug1064425
Reviewer Review Type Date Requested Status
Marc Tardif (community) Approve
Review via email: mp+128741@code.launchpad.net

Commit message

Fix bug 1064425 caused by get_wired/wifi_resume_time function returning a map instead of a list

Description of the change

Trying to fix the problem caused by the fact that get_time_difference was expecting a list when calling get_*_reconnect_times and in fact getting a map object. My solution is to 'cast' the map object to a list in get_time_difference, but there are lots of possibilities so if someone feels strongly about another way then I'd be happy to hear it.

To post a comment you must log in.
Revision history for this message
Marc Tardif (cr3) wrote :

Good catch, approved!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-10-09 13:40:50 +0000
3+++ debian/changelog 2012-10-09 15:37:27 +0000
4@@ -156,6 +156,8 @@
5 to avoid invalid characters ending up in the submission.xml (LP: #1060332)
6 * scripts/network_reconnect_resume_test - map reconnect time strings to float
7 that they can be used in calculations later on (LP: #1064385)
8+ * scripts/network_reconnect_resume_test - convert map of reconnect times into
9+ a list in order to check if the list is empty (LP: #1064425)
10
11 [Sylvain Pineau]
12 * jobs/suspend.txt.in: Fixed suspend/suspend_advanced dependencies to avoid
13
14=== modified file 'scripts/network_reconnect_resume_test'
15--- scripts/network_reconnect_resume_test 2012-10-09 13:40:50 +0000
16+++ scripts/network_reconnect_resume_test 2012-10-09 15:37:27 +0000
17@@ -20,9 +20,9 @@
18 " system has been suspended", file=sys.stderr)
19 return None
20 if device == "wifi":
21- reconnect_times = get_wifi_reconnect_times()
22+ reconnect_times = list(get_wifi_reconnect_times())
23 elif device == "wired":
24- reconnect_times = get_wired_reconnect_times()
25+ reconnect_times = list(get_wired_reconnect_times())
26
27 if not reconnect_times:
28 print("Error obtaining %s connection time after a S3. Please be sure"

Subscribers

People subscribed via source and target branches