Skip to content

Commit be0ca37

Browse files
committed
'Stop' comman' command shows saved fact
Closes #157
1 parent f8f3505 commit be0ca37

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hamster_cli/hamster_cli.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,16 +304,17 @@ def _stop(controler):
304304
ValueError: If no *ongoing fact* can be found.
305305
"""
306306
try:
307-
controler.facts.stop_tmp_fact()
307+
fact = controler.facts.stop_tmp_fact()
308308
except ValueError:
309309
message = _(
310310
"Unable to continue temporary fact. Are you sure there is one?"
311311
"Try running *current*."
312312
)
313313
raise click.ClickException(message)
314314
else:
315-
controler.client_logger.info(_("Temporary fact stoped."))
316-
click.echo(_("Temporary fact stoped!"))
315+
message = '{fact} ({duration} minutes)'.format(fact=fact, duration=fact.get_string_delta())
316+
controler.client_logger.info(_(message))
317+
click.echo(_(message))
317318

318319

319320
@run.command(help=help_strings.CANCEL_HELP)

0 commit comments

Comments
 (0)