strip response
This commit is contained in:
parent
705dfe7196
commit
ee600178c4
1 changed files with 1 additions and 1 deletions
|
@ -315,7 +315,7 @@ class MastodonEmailBridge:
|
||||||
self.last_translation_response = None
|
self.last_translation_response = None
|
||||||
try:
|
try:
|
||||||
self.last_translation_response = response.json()
|
self.last_translation_response = response.json()
|
||||||
translation = self.last_translation_response['translatedText']
|
translation = self.last_translation_response['translatedText'].strip(' ').strip('\n')
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
self._log.error(
|
self._log.error(
|
||||||
"Error translating '%s' from '%s' to '%s'. %s. Response content: %s",
|
"Error translating '%s' from '%s' to '%s'. %s. Response content: %s",
|
||||||
|
|
Loading…
Reference in a new issue