8000 [@wescpy] make GAE Quickstart samples consistent (#6710) · runck014/python-docs-samples@02fca39 · GitHub
[go: up one dir, main page]

Skip to content

Commit 02fca39

Browse files
wescpyleahecole
andauthored
[@wescpy] make GAE Quickstart samples consistent (GoogleCloudPlatform#6710)
* make GAE Quickstart samples consistent * make GAE Quickstart samples consistent * Update main.py fix copyright * Update main.py Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>
1 parent 6977dc8 commit 02fca39

File tree

2 files changed

+4
-15
lines changed
  • appengine

2 files changed

+4
-15
lines changed

appengine/flexible/hello_world/main.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
# limitations under the License.
1414

1515
# [START gae_flex_quickstart]
16-
import logging
17-
1816
from flask import Flask
1917

2018

@@ -27,17 +25,8 @@ def hello():
2725
return 'Hello World!'
2826

2927

30-
@app.errorhandler(500)
31-
def server_error(e):
32-
logging.exception('An error occurred during a request.')
33-
return """
34-
An internal error occurred: <pre>{}</pre>
35-
See logs for full stacktrace.
36-
""".format(e), 500
37-
38-
3928
if __name__ == '__main__':
40-
# This is used when running locally. Gunicorn is used to run the
41-
# application on Google App Engine. See entrypoint in app.yaml.
29+
# This is used when running locally only. When deploying to Google App
30+
# Engine, a webserver process such as Gunicorn will serve the app.
4231
app.run(host='127.0.0.1', port=8080, debug=True)
4332
# [END gae_flex_quickstart]

appengine/standard_python3/hello_world/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def hello():
3030

3131
if __name__ == '__main__':
3232
# This is used when running locally only. When deploying to Google App
33-
# Engine, a webserver process such as Gunicorn will serve the app. This
34-
# can be configured by adding an `entrypoint` to app.yaml.
33+
# Engine, a webserver process such as Gunicorn will serve the app. You
34+
# can configure startup instructions by adding `entrypoint` to app.yaml.
3535
app.run(host='127.0.0.1', port=8080, debug=True)
3636
# [END gae_python3_app]
3737
# [END gae_python38_app]

0 commit comments

Comments
 (0)
0