Browse Source

Fix minor bugs

tags/nilmtools-1.1.3
Jim Paris 11 years ago
parent
commit
4c748ec00c
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/cleanup.py

+ 2
- 2
src/cleanup.py View File

@@ -19,7 +19,7 @@ def warn(msg, *args):
fprintf(sys.stderr, "warning: " + msg + "\n", *args)

class TimePeriod(object):
_units = { 'h': ('hour', 60*60*24),
_units = { 'h': ('hour', 60*60),
'd': ('day', 60*60*24),
'w': ('week', 60*60*24*7),
'm': ('month', 60*60*24*30),
@@ -228,7 +228,7 @@ def main(argv = None):
keep = seconds_to_timestamp(streams[path].keep.seconds())
for i in intervals:
total += i.end - i.start
if total < keep:
if total <= keep:
continue
remove_before = i.start + (total - keep)
break


Loading…
Cancel
Save