What version are you running?
2.0.12
What's the URL of the page containing the problem?
N/A
What steps will reproduce the problem?
1. Install ReviewBoard
2. Use rb-site manage to get and set int, bool or null values
What is the expected output? What do you see instead?
- int
- rb-site manage /var/www/reviewboard get-siteconfig -- --key mail_port
- Expected: 25
- Received: AttributeError: 'int' object has no attribute 'endswith' [along with a stack trace and an exit status of 1]
- Notes: looks like something is expecting a string object
- rb-site manage /var/www/reviewboard set-siteconfig -- --key mail_port --value 25
- Expected: Setting 'mail_port' to 25
- Received: Setting 'mail_port' to 25
- Notes: works as expected
- bool
- rb-site manage /var/www/reviewboard get-siteconfig -- --key mail_use_tls
- Expected: false
- Received: AttributeError: 'bool' object has no attribute 'endswith' [along with a stack trace and an exit status of 1]
- Notes: looks like something is expecting a string object
- rb-site manage /var/www/reviewboard set-siteconfig -- --key mail_use_tls --value true
- Expected: Setting 'mail_use_tls' to true
- Received: CommandError: 'true' is not a valid bool [and an exit status of 1]
- Notes: as list-siteconfig displays boolean values as true/false, one would expect such values to be valid input to set-siteconfig
- rb-site manage /rb-site manage /var/www/reviewboard set-siteconfig -- --key mail_use_tls --value 1
- Expected: Setting 'mail_use_tls' to true [or CommandError: '1' is not a valid bool]
- Received: Setting 'mail_use_tls' to True
- Notes: inconsistent with what get-siteconfig would be expected to return (based upon output of list-siteconfig) - this makes it more difficult to test the value of a configuration parameter before setting it as one would be testing for a different value (true) than that which would have to be used to set it (1)
- null
- rb-site manage /var/www/reviewboard get-siteconfig -- --key company
- Expected: null
- Received: AttributeError: 'NoneType' object has no attribute 'endswith' [along with a stack trace and an exit status of 1
- Notes: looks like something is expecting a string object
- rb-site manage /var/www/reviewboard set-siteconfig -- --key company --value 'Red Widgets'
- Expected: Setting 'company' to Red Widgets
- Received: CommandError: Cannot set NoneType keys [and an exit status of 1]
- Notes: rb-site manage doesn't seem to have a way to determine the type for a configuration parameter that is currently set to null
What operating system are you using? What browser?
Ubuntu 14.04, browser N/A
Please provide any additional information below.
These issues make it difficult to manage configuration of reviewboard programatically, particularly when one wishes to only set a configuration parameter if it is not already set to the desired value (i.e. testing the current value of a parameter before setting it), such as when using a configuration management tool like Puppet.
Note also that issue #3651 describes the specific case of the null value.