Python Ice Parsing: Bug or User Error?

in Help Center
I'm using IcePy 3.1.1. I don't seem to be able to parse Ice arguments correctly.
After a call to parseCommandLineOptions, the return value (args) is always None. Is this user error, or a bug in Python Ice?
Example Code:
Example use:
After a call to parseCommandLineOptions, the return value (args) is always None. Is this user error, or a bug in Python Ice?
Example Code:
#!/usr/bin/python import sys, Ice class ParseTestClient(Ice.Application): def run(self, args): # read properties (file or command line) properties = self.communicator().getProperties() print args # Note: There appears to be a bug; args is None after the following! args = properties.parseCommandLineOptions("ParseTest", args) print args return(1) app = ParseTestClient() sys.exit(app.main(sys.argv, "CanonicClient.config"))
Example use:
% ./ParseTestClient.py --Ice.Default.Host=foo --ParseTest.One=bar --ParseTest.Two=car -cd bread
None
0
Comments
You can fix this problem by making a simple change to ICE_HOME/python/Ice.py: These two functions were missing the return keyword.
Thanks for reporting this bug.
- Mark
Should I expect that this fix will make it into a future version of 3.2?
Yes. We always add bug fixes such as this to the next release as a matter of course.
Cheers,
Michi.