Merge lp:~kissiel/checkbox/fix-1392123 into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 3699
Merged at revision: 3698
Proposed branch: lp:~kissiel/checkbox/fix-1392123
Merge into: lp:checkbox
Diff against target: 20 lines (+1/-2)
1 file modified
plainbox/plainbox/impl/commands/inv_run.py (+1/-2)
To merge this branch: bzr merge lp:~kissiel/checkbox/fix-1392123
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+256480@code.launchpad.net

Description of the change

This MR fixes zeroing estimated_time.

This was caused by using min() instead of max() when handling negative estimates.
The MR also removes unused module in inv_run.py

To post a comment you must log in.
lp:~kissiel/checkbox/fix-1392123 updated
3698. By Maciej Kisielewski

plainbox:commands:inv_run: fix wrong reporting of estimated_time

This patch fixes reporting of time left in the session.

Signed-off-by: Maciej Kisielewski <email address hidden>

3699. By Maciej Kisielewski

plainbox:commands:inv_run: remove unused math module

Signed-off-by: Maciej Kisielewski <email address hidden>

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1, fun :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plainbox/plainbox/impl/commands/inv_run.py'
2--- plainbox/plainbox/impl/commands/inv_run.py 2015-04-16 10:16:50 +0000
3+++ plainbox/plainbox/impl/commands/inv_run.py 2015-04-16 12:46:00 +0000
4@@ -30,7 +30,6 @@
5 import io
6 import itertools
7 import logging
8-import math
9 import os
10 import sys
11 import time
12@@ -726,7 +725,7 @@
13 print(self.C.header(
14 _('Running job {} / {}. Estimated time left: {}').format(
15 job_no, len(jobs_to_run),
16- seconds_to_human_duration(min(0, estimated_time))),
17+ seconds_to_human_duration(max(0, estimated_time))),
18 fill='-'))
19 self.run_single_job(job)
20 estimated_time -= job.estimated_duration

Subscribers

People subscribed via source and target branches