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
=== modified file 'debian/changelog'
--- debian/changelog 2012-10-09 13:40:50 +0000
+++ debian/changelog 2012-10-09 15:37:27 +0000
@@ -156,6 +156,8 @@
156 to avoid invalid characters ending up in the submission.xml (LP: #1060332)156 to avoid invalid characters ending up in the submission.xml (LP: #1060332)
157 * scripts/network_reconnect_resume_test - map reconnect time strings to float157 * scripts/network_reconnect_resume_test - map reconnect time strings to float
158 that they can be used in calculations later on (LP: #1064385)158 that they can be used in calculations later on (LP: #1064385)
159 * scripts/network_reconnect_resume_test - convert map of reconnect times into
160 a list in order to check if the list is empty (LP: #1064425)
159 161
160 [Sylvain Pineau]162 [Sylvain Pineau]
161 * jobs/suspend.txt.in: Fixed suspend/suspend_advanced dependencies to avoid163 * jobs/suspend.txt.in: Fixed suspend/suspend_advanced dependencies to avoid
162164
=== modified file 'scripts/network_reconnect_resume_test'
--- scripts/network_reconnect_resume_test 2012-10-09 13:40:50 +0000
+++ scripts/network_reconnect_resume_test 2012-10-09 15:37:27 +0000
@@ -20,9 +20,9 @@
20 " system has been suspended", file=sys.stderr)20 " system has been suspended", file=sys.stderr)
21 return None21 return None
22 if device == "wifi":22 if device == "wifi":
23 reconnect_times = get_wifi_reconnect_times()23 reconnect_times = list(get_wifi_reconnect_times())
24 elif device == "wired":24 elif device == "wired":
25 reconnect_times = get_wired_reconnect_times()25 reconnect_times = list(get_wired_reconnect_times())
2626
27 if not reconnect_times:27 if not reconnect_times:
28 print("Error obtaining %s connection time after a S3. Please be sure"28 print("Error obtaining %s connection time after a S3. Please be sure"

Subscribers

People subscribed via source and target branches