arch-update: sleep 1 sec before checking

When waking up from suspend, there is sometimes a delay connecting to
the network, so arch-update gives an error
This commit is contained in:
alexcoder04 2022-05-01 12:15:29 +02:00
parent c011cfb6c1
commit 3da0f08fcb
No known key found for this signature in database
GPG key ID: 20C1E411A1672BB6

View file

@ -7,6 +7,7 @@ contributed by `lucassouto <https://github.com/lucassouto>`_ - many thanks!
""" """
import logging import logging
from time import sleep
import core.module import core.module
import core.widget import core.widget
@ -35,6 +36,7 @@ class Module(core.module.Module):
def update(self): def update(self):
self.__error = False self.__error = False
sleep(1)
code, result = util.cli.execute( code, result = util.cli.execute(
"checkupdates", ignore_errors=True, return_exitcode=True "checkupdates", ignore_errors=True, return_exitcode=True
) )