Merge pull request #49187 from erwindon/py27fixnumberformat

Fix for #45620: "Salt CLI is rounding floats to 2 decimal places"
This commit is contained in:
Daniel Wallace 2018-08-20 13:59:09 -05:00 committed by GitHub
commit 5ba7f60f03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,12 +81,14 @@ class NestDisplay(object):
)
# Number includes all python numbers types
# (float, int, long, complex, ...)
# use repr() to get the full precision also for older python versions
# as until about python32 it was limited to 12 digits only by default
elif isinstance(ret, Number):
out.append(
self.ustring(
indent,
self.LIGHT_YELLOW,
ret,
repr(ret),
prefix=prefix
)
)