Skip to content

Commit

Permalink
Add compatibility with graphite-api (passing fromTime=untilTime=0 ins…
Browse files Browse the repository at this point in the history
…tead of None when searching for metrics)
  • Loading branch information
vladimir-smirnov-sociomantic committed Oct 17, 2014
1 parent e4aa261 commit 9873d0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ceres.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ def hasDataForInterval(self, fromTime, untilTime):
earliestData = slices[-1].startTime
latestData = slices[0].endTime

return ((fromTime is None) or (fromTime < latestData)) and \
((untilTime is None) or (untilTime > earliestData))
return ((fromTime is 0) or (fromTime is None) or (fromTime < latestData)) and \
((untilTime is 0) or (untilTime is None) or (untilTime > earliestData))

def read(self, fromTime, untilTime):
# get biggest timeStep
Expand Down

0 comments on commit 9873d0b

Please sign in to comment.