Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyrasite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
pyrasite
Commits
fa2cffe2
Commit
fa2cffe2
authored
Jan 30, 2015
by
Luke Macken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipc: Catch exceptions when trying to close the sockets
parent
dd1f927a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
pyrasite/ipc.py
pyrasite/ipc.py
+8
-4
No files found.
pyrasite/ipc.py
View file @
fa2cffe2
...
@@ -24,6 +24,7 @@ import stat
...
@@ -24,6 +24,7 @@ import stat
import
socket
import
socket
import
struct
import
struct
import
tempfile
import
tempfile
import
traceback
import
subprocess
import
subprocess
import
platform
import
platform
...
@@ -205,10 +206,13 @@ class PyrasiteIPC(object):
...
@@ -205,10 +206,13 @@ class PyrasiteIPC(object):
return
data
return
data
def
close
(
self
):
def
close
(
self
):
if
self
.
sock
:
try
:
self
.
sock
.
close
()
if
self
.
sock
:
if
getattr
(
self
,
'server_sock'
,
None
):
self
.
sock
.
close
()
self
.
server_sock
.
close
()
if
getattr
(
self
,
'server_sock'
,
None
):
self
.
server_sock
.
close
()
except
:
traceback
.
print_exc
()
def
__repr__
(
self
):
def
__repr__
(
self
):
return
"<%s %s>"
%
(
self
.
__class__
.
__name__
,
self
.
pid
)
return
"<%s %s>"
%
(
self
.
__class__
.
__name__
,
self
.
pid
)
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