Merge lp:~dholbach/ubuntu-review-overview/writeout into lp:ubuntu-review-overview

Proposed by Daniel Holbach
Status: Merged
Merged at revision: 24
Proposed branch: lp:~dholbach/ubuntu-review-overview/writeout
Merge into: lp:ubuntu-review-overview
Diff against target: 32 lines (+9/-6)
1 file modified
countdown.py (+9/-6)
To merge this branch: bzr merge lp:~dholbach/ubuntu-review-overview/writeout
Reviewer Review Type Date Requested Status
Nigel Babu (community) Approve
Review via email: mp+27060@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Nigel Babu (nigelbabu) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'countdown.py'
2--- countdown.py 2010-06-03 13:00:27 +0000
3+++ countdown.py 2010-06-08 15:12:27 +0000
4@@ -23,6 +23,13 @@
5 im.putpixel((x,y), (255,0,0))
6 im.save(meterfile)
7
8+def write_out(file_name, number):
9+ if os.path.exists(file_name):
10+ os.remove(file_name)
11+ f = open(file_name, "w")
12+ f.write("%s\n" % str(number))
13+ f.close()
14+
15
16 def main():
17 launchpad = data.lp_login()
18@@ -37,12 +44,8 @@
19 print "In the queue: %s" % (total_patches-already_reviewed_patches)
20 draw(already_reviewed_patches, total_patches, False)
21 draw(already_reviewed_patches, total_patches, True)
22- queue_file = "in-the-queue.txt"
23- if os.path.exists(queue_file):
24- os.remove(queue_file)
25- f = open(queue_file, "w")
26- f.write("%s\n" % str(total_patches-already_reviewed_patches))
27- f.close()
28+ write_out("in-the-queue.txt", int(total_patches-already_reviewed_patches))
29+ write_out("total.txt", total_patches)
30
31 if __name__ == "__main__":
32 try:

Subscribers

People subscribed via source and target branches

to all changes: