Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions endpoints/bookstore-grpc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ FROM gcr.io/google_appengine/python

# Create a virtualenv for dependencies. This isolates these packages from
# system-level packages.
RUN virtualenv /env
RUN virtualenv -p python3.6 /env

# Setting these environment variables are the same as running
# source /env/bin/activate.
ENV VIRTUAL_ENV -p python3.5 /env
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH

ADD . /bookstore/
Expand Down
4 changes: 2 additions & 2 deletions endpoints/bookstore-grpc/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from contextlib import contextmanager

import status
import grpc


@contextmanager
Expand All @@ -23,6 +23,6 @@ def context(grpc_context):
try:
yield
except KeyError as key_error:
grpc_context.code(status.Code.NOT_FOUND)
grpc_context.code(grpc.StatusCode.NOT_FOUND)
grpc_context.details(
'Unable to find the item keyed by {}'.format(key_error))