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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
slapos
Commits
b6cc7ac0
Commit
b6cc7ac0
authored
Oct 24, 2016
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
free_port: fixup
parent
579cf79d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
slapos/recipe/free_port.py
slapos/recipe/free_port.py
+8
-10
No files found.
slapos/recipe/free_port.py
View file @
b6cc7ac0
...
@@ -48,16 +48,14 @@ class Recipe(GenericBaseRecipe):
...
@@ -48,16 +48,14 @@ class Recipe(GenericBaseRecipe):
# requested service itself.
# requested service itself.
# If this check isn't done, a new port would be picked for every upgrade
# If this check isn't done, a new port would be picked for every upgrade
# of the software release
# of the software release
try
:
port
=
self
.
getValueFromPreviousRun
(
name
,
'port'
)
port
=
self
.
getValueFromPreviousRun
(
name
,
'port'
)
# Port can be 0 in case of upgrade: some old service still runs on port,
# Port can be 0 in case of upgrade: some old service still runs on port,
# so 0 is returned by default. Then, on next run, this recipe is processed
# so 0 is returned by default. Then, on next run, this recipe is processed
# again until a correct value is returned
# again until a correct value is returned
if
port
!=
'0'
:
if
port
!=
'0'
:
self
.
options
[
'port'
]
=
port
self
.
options
[
'port'
]
=
port
return
return
except
(
IOError
,
ConfigParser
.
NoSectionError
,
ConfigParser
.
NoOptionError
):
pass
# Otherwise, let's find one
# Otherwise, let's find one
self
.
minimum
=
int
(
options
.
get
(
'minimum'
,
1024
))
self
.
minimum
=
int
(
options
.
get
(
'minimum'
,
1024
))
...
...
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