Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set data directory every time on context as no longer needed #691

Merged
merged 1 commit into from
Aug 22, 2020
Merged
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
13 changes: 2 additions & 11 deletions pyproj/_datadir.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ cdef void pyproj_context_initialize(

cdef PJ_CONTEXT* pyproj_context_create(
network=None,
):
) except *:
"""
Create and initialize the context(s) for pyproj.
This also manages whether the global context is used.
Expand All @@ -182,16 +182,7 @@ cdef PJ_CONTEXT* pyproj_context_create(
if _USE_GLOBAL_CONTEXT:
return NULL
cdef PJ_CONTEXT* context = proj_context_create()
try:
pyproj_context_initialize(
context,
network=network,
)
except DataDirError:
if context != NULL:
proj_context_destroy(context)
context = NULL
raise
pyproj_context_set_enable_network(context, network=network)
return context


Expand Down