diff options
author | Peter van 't Zand <petervtzand@gmail.com> | 2015-11-19 10:03:49 +0100 |
---|---|---|
committer | Peter van 't Zand <petervtzand@gmail.com> | 2015-11-19 10:03:49 +0100 |
commit | fcc7902ab438a08afe74a8eabb3f43d06cd0d647 (patch) | |
tree | c18c709b95b0292a0b13970105d7a37f637c913f | |
parent | f7ba4bc74d420a7920f27bc97f0a3a889da00a95 (diff) | |
download | croniter-fcc7902ab438a08afe74a8eabb3f43d06cd0d647.tar.gz |
added python 2.6 comment so it won't be deleted
-rw-r--r-- | src/croniter/croniter.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/croniter/croniter.py b/src/croniter/croniter.py index b24d17e..2a237a9 100644 --- a/src/croniter/croniter.py +++ b/src/croniter/croniter.py @@ -171,12 +171,13 @@ class croniter(object): def _timedelta_to_seconds(cls, td): """ Converts a 'datetime.timedelta' object `td` into seconds contained in - the duration + the duration. + Note: We cannot use `timedelta.total_seconds()` because this is not + supported by Python 2.6. """ return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) \ / 10**6 - # iterator protocol, to enable direct use of croniter # objects in a loop, like "for dt in croniter('5 0 * * *'): ..." # or for combining multiple croniters into single |