Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo <gustavo@gustavo-HP.(none)>2013-02-08 15:16:11 (GMT)
committer Gustavo <gustavo@gustavo-HP.(none)>2013-02-08 15:16:11 (GMT)
commite63fe93a103e2224e462e338fe766fde27e0d409 (patch)
tree8817843db91438b8d0d30f05ab054d11a201c72a
parentb4653637533d791a554f8ec3b05df5826e7c073f (diff)
Fix issue when start_date > last_record_date. In this case asume that this rrd file is newer althoug has older records, and set as start_date = first_record_date
-rw-r--r--sugar_stats_consolidation/rrd_files.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sugar_stats_consolidation/rrd_files.py b/sugar_stats_consolidation/rrd_files.py
index 6c294f8..dec2c43 100644
--- a/sugar_stats_consolidation/rrd_files.py
+++ b/sugar_stats_consolidation/rrd_files.py
@@ -14,10 +14,10 @@ class RRD:
self.rrd_name = name
- if date_start == None:
+ if date_start == None or (date_start > rrdtool.last(str(os.path.join(path, name)))):
self.date_start = str(rrdtool.first(str(os.path.join (path,name))))
else:
- self.date_start = str(date_start)
+ self.date_start = date_start
if date_end == None:
self.date_end = str(rrdtool.last(str(os.path.join(path, name))))