VOLTTRON / volttron

VOLTTRON Distributed Control System Platform
https://volttron.readthedocs.io/
Other
456 stars 216 forks source link

Global options to volttron-ctl not honored #109

Closed hashstat closed 8 years ago

hashstat commented 9 years ago

Calling volttron-ctl --vip-address /tmp/vip.socket status is not the same as calling volttron-ctl status --vip-address /tmp/vip.socket. The latter works as expected while the former ignores the --vip-address option, not even displaying an error. These two commands should be identical.

hashstat commented 8 years ago

This appears to be caused by a modification to Python's argparse module. This was working on my system with an earlier version of Python. I am currently running version 2.7.10 and am experiencing the bug. However, on an Ubuntu system running version 2.7.6, everything works as expected. Further examination is required.

hashstat commented 8 years ago

I verified that this bug is caused by a change in the argparse module introduced in Python 2.7.9. It can be fixed by setting defaults on the root parser of inherited parser instances rather than on their children. A fix is forthcoming.

hashstat commented 8 years ago

Oops. 09ded6f66 didn't actually fix the issue. I just forgot to revert my changes to the argparse module during testing. Back to the drawing board.

hashstat commented 8 years ago

Python revision 1a3143752db2 is responsible for the backward-incompatible change to fix Python issue 9351 and is causing Issue 24251. It appears that the easiest fix is to override the new code in argparse with the old. :-(