Archived
This forum has been archived. Please start a new discussion on GitHub.
Slice bool always maps to True in python server
sac_urs
in Bug Reports
The slice bool varable always maps to true in python.
Even if the value is being set to false, it becomes True in python server.
But if the field is declared as string in slice and set to false, the false value is retained in python server.
Even if the value is being set to false, it becomes True in python server.
But if the field is declared as string in slice and set to false, the false value is retained in python server.
0
Comments
-
Hi,
version of Ice - 2.1.2
python version - 2.3.5
operating system version - Debian Gnu/Linux - 2.6.8-2-686
here is a small example:
slice :module Foo { class Bar { int id; bool status; string name; }; interface UpdateValues { void submit (Bar b); }; };corresponding python client code:def run(argv, communicator): query = IcePack.QueryPrx.checkedCast(communicator.stringToProxy('IcePack/Query')) base = query.findObjectByType("::Foo::UpdateValues") x = Foo.UpdateValuesPrx.checkedCast(base) rec = Foo.Bar() rec.id = 123 rec.status = 'False' rec.name = 'some name' x.update(rec) props = Ice.createProperties() props.load('/etc/prh/ice.conf') communicator = Ice.initializeWithProperties(sys.argv, props) run(sys.argv, communicator)
the false value gets mapped to true in the python server.0
