3651: rb-site manage get-siteconfig and set-siteconfig cannot handle null values

ja***@jasonan******** (Google Code) (Is this you? Claim this profile.)
Jan. 31, 2015
3743
What version are you running? 2.0.11

What's the URL of the page containing the problem? n/a

What steps will reproduce the problem?
1. Perform initial install of ReviewBoard, confirm it works.
2. run: `rb-site manage /opt/reviewboard/site set-siteconfig -- --key 'logging_directory' --value '/opt/reviewboard/site/logs'`
3. run: `rb-site manage /opt/reviewboard/site get-siteconfig -- --key 'logging_directory'`

What is the expected output?
for set: "Setting 'logging_directory' to '/opt/reviewboard/site/logs'
for get: the current value

What do you see instead?
for set:
Command exits 1 with output: CommandError: Cannot set NoneType keys
for get:
[root@centos-64-x64 ~]# /opt/reviewboard/bin/rb-site manage /opt/reviewboard/site get-siteconfig -- --key 'logging_directory'
Traceback (most recent call last):
  File "/opt/reviewboard/bin/rb-site", line 9, in <module>
    load_entry_point('ReviewBoard==2.0.11', 'console_scripts', 'rb-site')()
  File "/opt/reviewboard/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py", line 1877, in main
    command.run()
  File "/opt/reviewboard/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py", line 1806, in run
    site.run_manage_command(args[0], args[1:])
  File "/opt/reviewboard/lib/python2.7/site-packages/reviewboard/cmdline/rbsite.py", line 654, in run_manage_command
    execute_from_command_line([__file__, cmd] + params)
  File "/opt/reviewboard/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/opt/reviewboard/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/reviewboard/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/opt/reviewboard/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/opt/reviewboard/lib/python2.7/site-packages/django/core/management/base.py", line 415, in handle
    return self.handle_noargs(**options)
  File "/opt/reviewboard/lib/python2.7/site-packages/djblets/siteconfig/management/commands/get-siteconfig.py", line 45, in handle_noargs
    self.stdout.write(node[key_basename])
  File "/opt/reviewboard/lib/python2.7/site-packages/django/core/management/base.py", line 65, in write
    if ending and not msg.endswith(ending):
AttributeError: 'NoneType' object has no attribute 'endswith'

What operating system are you using? What browser?
CentOS 6.4; no browser

Please provide any additional information below.
`rb-site manage list-siteconfig` shows the value of logging_directory (after initial site installation) as null. I've also tried this with other values that default to null ('company', 'auth_ldap_base_dn', etc.) and have confirmed that the `rb-site manage [get|set]-siteconfig` commands cannot handle doing *anything* with a value that is currently null.