Skip to content

Commit

Permalink
startとfinish時にwriteする
Browse files Browse the repository at this point in the history
  • Loading branch information
itkr committed Sep 2, 2015
1 parent 0d772d9 commit d8ef61f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion progress_bar.py
Expand Up @@ -48,8 +48,8 @@ def update(self, num):
self.current_num = max(0, min(self.max_num, num))

def start(self):
self.update(0)
self.started_at = datetime.now()
self.update(0)

def finish(self):
self.finished_at = datetime.now()
Expand Down Expand Up @@ -88,6 +88,7 @@ def update(self, num):

def finish(self):
super(CommandLineProgressBar, self).finish()
self._write_course()
if not self.is_complete():
self._write_fail()
self._line_brake()
Expand Down

0 comments on commit d8ef61f

Please sign in to comment.