From 26eb3babd5ebb4fbe92a82383b3ba16c8f6421d2 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 21 May 2021 21:30:39 +0200 Subject: fix some typos --- roles/storage/zfs/syncoid/templates/autosuspend.py.j2 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'roles/storage/zfs/syncoid/templates') diff --git a/roles/storage/zfs/syncoid/templates/autosuspend.py.j2 b/roles/storage/zfs/syncoid/templates/autosuspend.py.j2 index 58752328..b783f7a2 100644 --- a/roles/storage/zfs/syncoid/templates/autosuspend.py.j2 +++ b/roles/storage/zfs/syncoid/templates/autosuspend.py.j2 @@ -72,13 +72,13 @@ class AutoSuspender(object): for timer in timers: next = self._get_timer_next_elapse(timer[1]) if next == None: - print(" [NO] the next elapse of timer '%s' is invalid, assuming the unit is currently active" % (timer[0])) + print(" [NO] the next elapse time of '%s' is invalid, assuming the unit is currently active" % (timer[0])) result = False continue until = next - datetime.datetime.now() if(until < datetime.timedelta(minutes=10)): - print(" [NO] timer '%s' elapses in less then 10 Minutes -> %s (%s)" % (timer[0], next, until)) + print(" [NO] timer '%s' elapses in less than 10 minutes -> %s (%s)" % (timer[0], next, until)) result = False else: print(" [ok] timer '%s' elapses in %s (%s)" % (timer[0], until, next)) @@ -88,18 +88,17 @@ class AutoSuspender(object): def suspend(self): manager = self._get_logind_manager_interface() if not manager.CanSuspend(): - print("suspending is not possible!") + print("ERR: system can not be suspended") return try: manager.Suspend(False) except dbus.exceptions.DBusException: print("ERR: %s" % error) - return None if __name__ == "__main__": s = AutoSuspender() - print("checking if system should be suspended:") + print("checking if the system can be suspended:") if s.check(): print("trying to suspend system") s.suspend() -- cgit v1.2.3