mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-10 11:00:22 +00:00
upgrades: Make sure error output shows up
This commit is contained in:
parent
24cd095c6e
commit
921f7c8767
@ -61,15 +61,13 @@ def subcommand_run(_):
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
output = subprocess.check_output(['unattended-upgrades', '-v'])
|
||||
subprocess.check_call(['unattended-upgrades', '-v'])
|
||||
except FileNotFoundError:
|
||||
print('Error: unattended-upgrades is not available.', file=sys.stderr)
|
||||
sys.exit(2)
|
||||
except Exception as error:
|
||||
print('Error: {0}'.format(error), file=sys.stderr)
|
||||
sys.exit(3)
|
||||
else:
|
||||
print(output.decode())
|
||||
|
||||
|
||||
def subcommand_check_auto(_):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user