qvm-sync-clock: don't show unverified output to the terminal

This commit is contained in:
Marek Marczykowski-Górecki 2014-04-15 04:14:10 +02:00
parent ac7746feed
commit 0695a5ff82

View File

@ -76,7 +76,7 @@ def main():
date_out = p.stdout.read(100)
date_out = date_out.strip()
if not re.match(r'^[A-Za-z]+[,] [0-9][0-9] [A-Za-z]+ [0-9][0-9][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [+]0000$', date_out):
print >> sys.stderr, date_out, 'Invalid date output, aborting!'
print >> sys.stderr, 'Invalid date output, aborting!'
sys.exit(1)
# Sync dom0 time