Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Stephane VAROQUI
slapos
Commits
d7e912bc
Commit
d7e912bc
authored
Jan 09, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor cleanup
parent
55802c22
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
slapos/recipe/check_port_listening/__init__.py
slapos/recipe/check_port_listening/__init__.py
+1
-0
slapos/recipe/check_port_listening/template/socket_connection_attempt.py.in
...k_port_listening/template/socket_connection_attempt.py.in
+2
-7
No files found.
slapos/recipe/check_port_listening/__init__.py
View file @
d7e912bc
# vim: set et sts=2:
##############################################################################
##############################################################################
#
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
...
...
slapos/recipe/check_port_listening/template/socket_connection_attempt.py.in
View file @
d7e912bc
...
@@ -7,15 +7,10 @@ import sys
...
@@ -7,15 +7,10 @@ import sys
hostname = "%(hostname)s"
hostname = "%(hostname)s"
port = %(port)s
port = %(port)s
connection_okay = False
try:
try:
s = socket.create_connection((hostname, port))
s = socket.create_connection((hostname, port))
connection_okay = True
s.close()
s.close()
except (socket.error, socket.timeout):
except (socket.error, socket.timeout):
connection_okay = False
sys.stderr.write("%(port)s on %(hostname)s isn't listening\n")
if not connection_okay:
print >> sys.stderr, "%(port)s on %(hostname)s isn't listening"
sys.exit(127)
sys.exit(127)
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