qvm-sync-clock: hide stdout in non-verbose mode

This commit is contained in:
Marek Marczykowski-Górecki 2015-07-08 01:59:49 +02:00
parent 5f9a30d335
commit 6c167911f1

View File

@ -102,8 +102,10 @@ def main():
if verbose:
print >> sys.stderr, '--> Syncing dom0 clock.'
subprocess.check_call(['sudo', 'date', '-u', '-Iseconds', '-s', date_out])
subprocess.check_call(['sudo', 'hwclock', '--systohc'])
subprocess.check_call(['sudo', 'date', '-u', '-Iseconds', '-s', date_out],
stdout=None if verbose else open(os.devnull, 'w'))
subprocess.check_call(['sudo', 'hwclock', '--systohc'],
stdout=None if verbose else open(os.devnull, 'w'))
# Sync other VMs clock
for vm in qvm_collection.values():