Fixed some ci/circleci: static-check error

This commit is contained in:
lufton
2019-05-02 17:29:40 +03:00
parent 886afc3ff1
commit bdef472dd5

View File

@@ -59,8 +59,10 @@ class GoogleCloudTTSProvider(Provider):
if key_file and os.path.isfile(path): if key_file and os.path.isfile(path):
os.environ[GOOGLE_APPLICATION_CREDENTIALS] = path os.environ[GOOGLE_APPLICATION_CREDENTIALS] = path
if GOOGLE_APPLICATION_CREDENTIALS not in os.environ: if GOOGLE_APPLICATION_CREDENTIALS not in os.environ:
_LOGGER.error("You need to specify valid" _LOGGER.error(
" GOOGLE_APPLICATION_CREDENTIALS file location.") "You need to specify valid"
" GOOGLE_APPLICATION_CREDENTIALS file location."
)
self.client = texttospeech.TextToSpeechClient() self.client = texttospeech.TextToSpeechClient()
self.audio_config = texttospeech.types.AudioConfig( self.audio_config = texttospeech.types.AudioConfig(
audio_encoding=texttospeech.enums.AudioEncoding.MP3 audio_encoding=texttospeech.enums.AudioEncoding.MP3