Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
re6stnet
Commits
5cb423e3
Commit
5cb423e3
authored
May 16, 2024
by
Tom Niget
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Registry.close() function to properly clean up resources
parent
859f2a78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
re6st/registry.py
re6st/registry.py
+5
-0
re6st/tests/test_unit/test_registry.py
re6st/tests/test_unit/test_registry.py
+1
-0
No files found.
re6st/registry.py
View file @
5cb423e3
...
...
@@ -155,6 +155,11 @@ class RegistryServer:
else
:
self
.
newHMAC
(
0
)
def
close
(
self
):
self
.
sock
.
close
()
self
.
db
.
close
()
self
.
ctl
.
close
()
def
getConfig
(
self
,
name
,
*
default
):
r
,
=
next
(
self
.
db
.
execute
(
"SELECT value FROM config WHERE name=?"
,
(
name
,)),
default
)
...
...
re6st/tests/test_unit/test_registry.py
View file @
5cb423e3
...
...
@@ -70,6 +70,7 @@ class TestRegistryServer(unittest.TestCase):
@
classmethod
def
tearDownClass
(
cls
):
cls
.
server
.
close
()
# remove database
for
file
in
[
cls
.
config
.
db
,
cls
.
config
.
ca
,
cls
.
config
.
key
]:
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment