From fd768cf878f04e44279cdf8f25fc4f64ee911592 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 30 Jun 2011 10:11:37 -0400 Subject: [PATCH] hours: draw `+' before positive adjustments --- hours | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hours b/hours index 6ce6885..e3cd6aa 100755 --- a/hours +++ b/hours @@ -159,7 +159,8 @@ def main(argv): hours += adj sys.stdout.write(' (%.1f hours)' % hours) if adj != 0.0: - sys.stdout.write(' [%.1f]' % adjustments[iso_spec]) + sys.stdout.write( + ' [%s%.1f]' % ('+' if adj > 0.0 else '', adj)) if (iso_spec == now.strftime(ISO_DATE_FMT) and hours < HOURS_PER_DAY): sys.stdout.write(', %.1f at %s' % (HOURS_PER_DAY,