Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
fdd9f371
Commit
fdd9f371
authored
10 years ago
by
Chuck Musser
Browse files
Options
Downloads
Patches
Plain Diff
Set initialized flag to true after loading library.
parent
1520b5d9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nacl/_lib/__init__.py
+3
-2
3 additions, 2 deletions
src/nacl/_lib/__init__.py
with
3 additions
and
2 deletions
src/nacl/_lib/__init__.py
+
3
−
2
View file @
fdd9f371
...
@@ -62,7 +62,7 @@ class Library(object):
...
@@ -62,7 +62,7 @@ class Library(object):
def
__init__
(
self
,
ffi
):
def
__init__
(
self
,
ffi
):
self
.
ffi
=
ffi
self
.
ffi
=
ffi
self
.
_initalized
=
False
self
.
_init
i
alized
=
False
# This prevents the compile_module() from being called, the module
# This prevents the compile_module() from being called, the module
# should have been compiled by setup.py
# should have been compiled by setup.py
...
@@ -71,8 +71,9 @@ class Library(object):
...
@@ -71,8 +71,9 @@ class Library(object):
self
.
ffi
.
verifier
.
compile_module
=
_compile_module
self
.
ffi
.
verifier
.
compile_module
=
_compile_module
def
__getattr__
(
self
,
name
):
def
__getattr__
(
self
,
name
):
if
not
self
.
_initalized
:
if
not
self
.
_init
i
alized
:
self
.
_lib
=
self
.
ffi
.
verifier
.
load_library
()
self
.
_lib
=
self
.
ffi
.
verifier
.
load_library
()
self
.
_initialized
=
True
# redirect attribute access to the underlying lib
# redirect attribute access to the underlying lib
attr
=
getattr
(
self
.
_lib
,
name
)
attr
=
getattr
(
self
.
_lib
,
name
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment