Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 424e1e0

Browse filesBrowse files
maciekrbJon Wayne Parrott
authored andcommitted
Fixes python version flag & bad import in context manager (GoogleCloudPlatform#1368)
1 parent 5c23563 commit 424e1e0
Copy full SHA for 424e1e0

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed

‎endpoints/bookstore-grpc/Dockerfile

Copy file name to clipboardExpand all lines: endpoints/bookstore-grpc/Dockerfile
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ FROM gcr.io/google_appengine/python
55

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

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

1515
ADD . /bookstore/

‎endpoints/bookstore-grpc/status.py

Copy file name to clipboardExpand all lines: endpoints/bookstore-grpc/status.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from contextlib import contextmanager
1616

17-
import status
17+
import grpc
1818

1919

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.