projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7502971
)
diskwatcher.tac: don't report negative timeleft
author
Brian Warner
<warner@lothar.com>
Thu, 7 Aug 2008 17:34:33 +0000
(10:34 -0700)
committer
Brian Warner
<warner@lothar.com>
Thu, 7 Aug 2008 17:34:33 +0000
(10:34 -0700)
misc/spacetime/diskwatcher.tac
patch
|
blob
|
history
diff --git
a/misc/spacetime/diskwatcher.tac
b/misc/spacetime/diskwatcher.tac
index 15e5d47f45275332d1908a7e81b499fc95a58504..9780e2dd4d4d9ca771c18a32e68711cb9d5954e3 100644
(file)
--- a/
misc/spacetime/diskwatcher.tac
+++ b/
misc/spacetime/diskwatcher.tac
@@
-160,10
+160,9
@@
class DiskWatcher(service.MultiService, resource.Resource):
growth = self.growth(timespan)
print name, total_avail_space, growth
if growth is not None:
- try:
+ timeleft = None
+ if growth > 0:
timeleft = total_avail_space / growth
- except ZeroDivisionError:
- timeleft = None
timespans.append( (name, timespan, growth, timeleft) )
return timespans