# HG changeset patch # User Björn Ricks # Date 1304425871 -7200 # Node ID 9826dcbf119f661e2aec514d5b2a1ac462691c1b # Parent 2f9093b41c5b9b4d628023a97bd30f5c1797d2a3 rename total variable to total_proj because it refects to total time in a project diff -r 2f9093b41c5b -r 9826dcbf119f contrib/zeiterfassung --- a/contrib/zeiterfassung Wed Apr 20 10:19:38 2011 +0200 +++ b/contrib/zeiterfassung Tue May 03 14:31:11 2011 +0200 @@ -219,14 +219,14 @@ cur.execute(ENTRIES, {'project_id': project_id}) else: cur.execute(ENTRIES_YEAR, {'project_id': project_id, 'year':proj_year}) - total = 0 + total_proj = 0 while True: row = cur.fetchone() if not row: break d = date(*map(int, row[0].split('-'))) t = max(60, row[1]) c = row[2] - total += t + total_proj += t workpackage = "----" if c: m = WORKPACKAGE.match(c) @@ -241,7 +241,7 @@ user, workpackage, c) - print "# total: %sh\n\n" % human_time(total) + print "# total: %sh\n\n" % human_time(total_proj) finally: tolerantClose(cur) tolerantClose(con)