Skip to content

Commit a28c440

Browse files
Ken KundertKen Kundert
authored andcommitted
fix issues in overdue hours
1 parent bc78254 commit a28c440

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

doc/releases.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Latest development release
66
| Version: 1.42
77
| Released: 2025-06-14
88
9+
- Fix issues in :ref:`emborg-overdue <emborg_overdue>` *hours*.
10+
11+
912
1.42 (2025-06-14)
1013
-----------------
1114
- Allow empty lines in a patterns file (resolves issue #84).

emborg/overdue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def get_local_data(path, host, max_age):
150150
if not mtime:
151151
raise Error('backup time is not available.', culprit=path)
152152
delta = now - mtime
153-
hours = 24 * delta.days + delta.seconds / 3600
153+
hours = 24*delta.days + delta.seconds/3600
154154
overdue = truth(hours > max_age)
155155
locked = truth(locked)
156156
yield dict(
@@ -191,7 +191,7 @@ def get_remote_data(name, path):
191191
# fixed() {{{2
192192
# formats float using fixed point notation while removing trailing zeros
193193
def fixed(num, prec=2):
194-
return format(num, f".{prec}f").strip('0').strip('.')
194+
return format(num, f".{prec}f").rstrip('0').rstrip('.')
195195

196196
# Main {{{1
197197
def main():

0 commit comments

Comments
 (0)