Merge PR #33932 into octopus

* refs/pull/33932/head:
	cephadm: fix datetime regexp to capture at most 6 digits

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2020-03-12 21:55:39 -05:00
commit c36406a91b

View File

@ -812,7 +812,7 @@ def try_convert_datetime(s):
# In *all* cases, the 9 digit second precision is too much for
# python's strptime. Shorten it to 6 digits.
p = re.compile(r'(\.\d\d\d\d\d\d)\d\d\d')
p = re.compile(r'(\.[\d]{6})[\d]*')
s = p.sub(r'\1', s)
# replace trailling Z with -0000, since (on python 3.6.8) it won't parse