Rev 112: Handle when there are fewer than 20 summaries. in http://bazaar.launchpad.net/~meliae-dev/meliae/trunk
John Arbash Meinel
john at arbash-meinel.com
Wed Dec 2 15:01:31 GMT 2009
At http://bazaar.launchpad.net/~meliae-dev/meliae/trunk
------------------------------------------------------------
revno: 112
revision-id: john at arbash-meinel.com-20091202150124-5641q7db43l7tgc7
parent: john at arbash-meinel.com-20091120192314-65sr6ey0vibcu7po
author: John O'Brien <jdo at canonical.com>
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Wed 2009-12-02 09:01:24 -0600
message:
Handle when there are fewer than 20 summaries.
-------------- next part --------------
=== modified file 'meliae/loader.py'
--- a/meliae/loader.py 2009-10-23 03:48:28 +0000
+++ b/meliae/loader.py 2009-12-02 15:01:24 +0000
@@ -160,7 +160,7 @@
' Index Count % Size % Cum Max Kind'
]
cumulative = 0
- for i in xrange(20):
+ for i in xrange(min(20, len(self.summaries))):
summary = self.summaries[i]
cumulative += summary.total_size
out.append(
More information about the bazaar-commits
mailing list