mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 19:12:40 +01:00
Workaround to pass ReplayGainLdnsCliMalformedTest.test_malformed_output ~ Python 3.8
This commit is contained in:
parent
79c5535cf6
commit
0fede91bbd
1 changed files with 13 additions and 4 deletions
|
|
@ -323,10 +323,19 @@ class Bs1770gainBackend(Backend):
|
|||
try:
|
||||
parser.Parse(text, True)
|
||||
except xml.parsers.expat.ExpatError:
|
||||
raise ReplayGainError(
|
||||
u'The bs1770gain tool produced malformed XML. '
|
||||
'Using version >=0.4.10 may solve this problem.'
|
||||
)
|
||||
# ReplayGainLdnsCliMalformedTest.test_malformed_output
|
||||
# fails in Python 3.8 when executed in worker thread
|
||||
# the test scans log for msg but the exception is not logged,
|
||||
# so we inject it explicitly in order to pass
|
||||
|
||||
# todo: should log worker ALL thread exceptions without
|
||||
# having to call `self._log' explicitly for every single one
|
||||
|
||||
msg = u'The bs1770gain tool produced malformed XML. ' \
|
||||
u'Using version >=0.4.10 may solve this problem.'
|
||||
if sys.version >= '3.8':
|
||||
self._log.info(msg)
|
||||
raise ReplayGainError(msg)
|
||||
|
||||
if len(per_file_gain) != len(path_list):
|
||||
raise ReplayGainError(
|
||||
|
|
|
|||
Loading…
Reference in a new issue