qvm-sync-clock: allow colon in timezone spec

`date` in debian 9 puts colon there. Since the timezone is not used here
in any way (it operates on UTC time anyway), simply allow this format
too.
This commit is contained in:
Marek Marczykowski-Górecki 2016-07-19 00:46:48 +02:00
parent f0489a3d5c
commit 9d1b7504da
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -101,7 +101,7 @@ def main():
gui=False, passio_popen=True, ignore_stderr=True) gui=False, passio_popen=True, ignore_stderr=True)
date_out = p.stdout.read(100) date_out = p.stdout.read(100)
date_out = date_out.strip() date_out = date_out.strip()
if not re.match(r'^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+0000$', date_out): if not re.match(r'^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+00:?00$', date_out):
print >> sys.stderr, 'Invalid date output, aborting!' print >> sys.stderr, 'Invalid date output, aborting!'
sys.exit(1) sys.exit(1)