Skip to content
Myr

Merge pull request #453 from naoyat/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

longer eta(>1day) support

authored by Armin Ronacher · committed by Armin Ronacher · parents d217382, 6ef691b · Browse files · 1 file+12 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+12 added−1 removed

  • other:+12 added−1 removed

1 file+12 added−1 removed

modified:click/_termui_impl.py+12 added-1 removed
127 unmodified lines
128 return 0.0129130 def format_eta(self):131 if self.eta_known:132 return time.strftime('%H:%M:%S', time.gmtime(self.eta + 1))132 t = self.eta + 1133 seconds = t % 60134 t /= 60135 minutes = t % 60136 t /= 60137 hours = t % 24138 t /= 24139 if t > 0:140 days = t141 return '%dd %02d:%02d:%02d' % (days, hours, minutes, seconds)142 else:143 return '%02d:%02d:%02d' % (hours, minutes, seconds)144 return ''145146 def format_pos(self):147 pos = str(self.pos)
398 unmodified lines