fix: fixing the RenamingUnpickler fix

This commit is contained in:
WeberJulian
2020-09-22 17:36:05 +02:00
committed by GitHub
parent 6a87b7e9aa
commit 3c212be5a8
+1 -3
View File
@@ -6,9 +6,7 @@ import pickle as pickle_tts
class RenamingUnpickler(pickle_tts.Unpickler):
"""Overload default pickler to solve module renaming problem"""
def find_class(self, module, name):
if 'TTS' in module:
module = module.replace('TTS', 'TTS')
return super().find_class(module, name)
return super().find_class(module.replace('mozilla_voice_tts', 'TTS'), name)
class AttrDict(dict):