Skip to content

Commit

Permalink
Removing ImportError check in Speech client.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Nov 2, 2016
1 parent 4dc9fa6 commit 760f0c1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/google-cloud-python-speech/google/cloud/speech/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,15 @@
from google.cloud.client import Client as BaseClient
from google.cloud.environment_vars import DISABLE_GRPC

from google.cloud.speech._gax import GAPICSpeechAPI
from google.cloud.speech.connection import Connection
from google.cloud.speech.encoding import Encoding
from google.cloud.speech.operation import Operation
from google.cloud.speech.sample import Sample
from google.cloud.speech.transcript import Transcript

try:
from google.cloud.speech._gax import GAPICSpeechAPI
except ImportError: # pragma: NO COVER
_HAVE_GAX = False
GAPICSpeechAPI = None
else:
_HAVE_GAX = True


_DISABLE_GAX = os.getenv(DISABLE_GRPC, False)
_USE_GAX = _HAVE_GAX and not _DISABLE_GAX
_USE_GAX = not os.getenv(DISABLE_GRPC, False)


class Client(BaseClient):
Expand Down

0 comments on commit 760f0c1

Please sign in to comment.