From 2c0d0dff8b8cb6bff2c92dd71d7ee83707391671 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Thu, 12 Jul 2012 03:43:57 +0200 Subject: [PATCH] dom0/qvm-sync-clock: string '\n' from date output --- dom0/qvm-tools/qvm-sync-clock | 1 + 1 file changed, 1 insertion(+) diff --git a/dom0/qvm-tools/qvm-sync-clock b/dom0/qvm-tools/qvm-sync-clock index 84f54ba8..c162aa89 100755 --- a/dom0/qvm-tools/qvm-sync-clock +++ b/dom0/qvm-tools/qvm-sync-clock @@ -73,6 +73,7 @@ def main(): p = clock_vm.run('user:date -u', verbose=verbose, passio_popen=True) date_out = p.stdout.read(100) + date_out = date_out.strip() if not re.match(r'^[A-Za-z]* [A-Za-z]* [ 0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [A-Z]* [0-9][0-9][0-9][0-9]$', date_out): print >> sys.stderr, 'Invalid date output, aborting!' sys.exit(1)