Minor improvement of auto-update check

Instead of relying on /etc/apt/apt.conf.d/20auto-upgrades having the
according entries we now verify the auto-upgrade entries via apt-config
This commit is contained in:
fonfon 2015-01-28 19:44:11 +00:00
parent cd057994d3
commit 4a19dcc807

View File

@ -71,7 +71,10 @@ def subcommand_run(_):
def subcommand_check_auto(_):
"""Check if automatic upgrades are enabled"""
print(os.path.isfile(AUTO_CONF_FILE))
arguments = ['apt-config', 'shell', 'UpdateInterval',
'APT::Periodic::Update-Package-Lists']
output = subprocess.check_output(arguments).decode()
print(bool(output and "1" in output))
def subcommand_enable_auto(_):