Juan Hernandez has posted comments on this change.

Change subject: cli: Don't write .0 suffix for integers
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/26864/1/src/ovirtcli/format/text.py
File src/ovirtcli/format/text.py:

Line 126:         else:
Line 127:             val = str(value)
Line 128: 
Line 129:         # Don't write the .0 suffix for floating point number whose 
value is
Line 130:         # actually an integer:
> btw if python generates from 'xs:decimal' - ''float" you can still address 
This change doesn't change the value of any thing, float or int, it only 
changes the external representation, so that the useless and confusing .0 isn't 
presented. It solves the bug without negative side effects.

The type/representation used by the API can't be changed without breaking 
backwards compatibility. Same for the SDKs.
Line 131:         if type(value) == float and val.endswith('.0'):
Line 132:             val = val[:-2]
Line 133: 
Line 134:         fil = (field if resource_context is None


-- 
To view, visit http://gerrit.ovirt.org/26864
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I21490ec50e3a7433331e981162de800c7d548f27
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mishka8...@yahoo.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to