New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mopidy --list-settings fails on fresh install #63

grunskis opened this Issue Feb 9, 2011 · 2 comments


2 participants

grunskis commented Feb 9, 2011

Stack trace:

Traceback (most recent call last):
  File /usr/lib/python2.6/, line 122, in _run_module_as_main
    __main__, fname, loader, pkg_name)
  File /usr/lib/python2.6/, line 34, in _run_code
    exec code in run_globals
  File /home/martins/source/tmp/mopidy/mopidy/, line 17, in <module>
  File /home/martins/source/tmp/mopidy/mopidy/, line 14, in main
  File /home/martins/source/tmp/mopidy/mopidy/, line 20, in __init__
    self.options = self.parse_options()
  File /home/martins/source/tmp/mopidy/mopidy/, line 40, in parse_options
    return parser.parse_args()[0]
  File /usr/lib/python2.6/, line 1394, in parse_args
    stop = self._process_args(largs, rargs, values)
  File /usr/lib/python2.6/, line 1434, in _process_args
    self._process_long_opt(rargs, values)
  File /usr/lib/python2.6/, line 1509, in _process_long_opt
    option.process(opt, value, values, self)
  File /usr/lib/python2.6/, line 788, in process
    self.action, self.dest, opt, value, values, parser)
  File /usr/lib/python2.6/, line 808, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File /home/martins/source/tmp/mopidy/mopidy/utils/, line 144, in list_settings_optparse_callback
    if key.endswith('PASSWORD') and len(value):
TypeError: object of type 'NoneType' has no len()

This comment has been minimized.


grunskis commented Feb 9, 2011

btw I have this fixed in my fork grunskis@f33c65d


This comment has been minimized.


jodal commented Feb 9, 2011

Thanks for the bug report and the patch! :-)

I've applied your patch to the develop branch and did a followup commit, e150a24, with some changes. See the commit message for an explanation of my changes.

@ghost ghost assigned jodal Apr 10, 2011

@jodal jodal closed this Apr 11, 2011

adamcik pushed a commit to adamcik/mopidy that referenced this issue Apr 19, 2011

Review patch for mopidyGH-63
- Moved mask_value_if_secret til after the method using it. Most
  important/interesting method first, lower level/more detailed later.
- Made the logic in mask_value_if_secret simpler to understand, I think,
  by making the two different cases more obvious.
- Split the test in two, as it actually tested two different cases.
- Changed the test names to explain what should happen, and not just
  what is tested.
- Add a new test that tests the case which caused the crash: a setting
  being None.

adamcik pushed a commit to adamcik/mopidy that referenced this issue Apr 19, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment