Traceback (most recent call last):
File "/usr/lib/picard/picard/ui/mainwindow.py", line 302, in _on_submit
self.tagger.acoustidmanager.submit()
File "/usr/lib/picard/picard/acoustidmanager.py", line 78, in submit
log.debug("AcoustID: submitting ...")
NameError: global name 'log' is not defined
and pylint tells more:
Module picard.ui.infodialog
E: 55,16: Undefined variable 'log' (undefined-variable)
E: 55,26: Undefined variable 'traceback' (undefined-variable)
Traceback (most recent call last):
File "/usr/lib/picard/picard/webservice.py", line 241, in _process_reply
handler(str(reply.readAll()), reply, error)
File "/usr/lib/picard/picard/collection.py", line 102, in request_finished
echo=log.error
NameError: global name 'log' is not defined
- modify set_statusbar_message(): drop hacky %s replacement, it shouldn't be needed anyway
- add named arguments echo and translate to it, to cover all needs
- rewrite translatable strings to use named place holders
- fix up some messages, add plural forms if needed
http://tickets.musicbrainz.org/browse/PICARD-597
A babel bug prevents `input_dirs` to be parsed correctly with babel pre-1.0 versions.
Using regen_pot_file with babel 0.9.6 leads to an empty pot file (but header).
The fix appears in babel 1.0 Changelog:
- fix ‘input_dirs’ option for setuptools integration (ticket #232, initial patch by Étienne Bersac)
The workaround just splits `input_dirs` as it should when old babel versions are used.
Total didn't include all weights (ie. weights["format"] wasn't added), leading
to incorrect result, eventually > 1.0
The fix consists mostly to get rid of separated calculation of the total, using
previously introduced linear_combination_of_weights().
- partly rewrite compare_to_track() and compare_to_release()
- move parts building to new compare_to_release_parts() and drop return_parts parameter
- drop calculation of totals since this is handled in linear_combination_of_weights()
It is a safer alternative to reduce(lambda x, y: x + y[0] * y[1] / total, parts, 0.0) expression
which was requiring a separated calculation of total, prone to errors.
======================================================================
ERROR: test_display_tag_name (test.test_utils.TagsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/musicbrainz/picard/test/test_utils.py", line 89, in test_display_tag_name
self.assertEqual(dtn('tag'), 'tag')
File "/home/travis/build/musicbrainz/picard/picard/util/tags.py", line 106, in display_tag_name
return _(name)
NameError: global name '_' is not defined
- fix typo in method name
- make comment more explicit
- test the case where only one element is in the list
- ignore 0 element case (should test skip(), but 2.6 lacks it)