Skip to content

Commit

Permalink
Use os.environ.setdefault
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza authored Nov 1, 2023
1 parent 5d37c28 commit 5a45b09
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/python/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
from google.cloud import storage

# This endpoint assumes that you are using the default port 4443 from the container.
# If you are using a different port you need to update this endpoint
os.environ["STORAGE_EMULATOR_HOST"] = os.environ.get(
"STORAGE_EMULATOR_HOST", "http://localhost:4443"
)
# If you are using a different port, please set the environment variable STORAGE_EMULATOR_HOST.
os.environ.setdefault("STORAGE_EMULATOR_HOST", "http://localhost:4443")


client = storage.Client(
Expand Down

0 comments on commit 5a45b09

Please sign in to comment.