Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
9ba6c087
Commit
9ba6c087
authored
Oct 13, 2015
by
Marius Gedminas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python 3: there's no basestring
parent
3cae8a43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
lib/ansible/executor/playbook_executor.py
+3
-1
No files found.
lib/ansible/executor/playbook_executor.py
View file @
9ba6c087
...
@@ -24,6 +24,8 @@ import locale
...
@@ -24,6 +24,8 @@ import locale
import
signal
import
signal
import
sys
import
sys
from
six
import
string_types
from
ansible
import
constants
as
C
from
ansible
import
constants
as
C
from
ansible.errors
import
*
from
ansible.errors
import
*
from
ansible.executor.task_queue_manager
import
TaskQueueManager
from
ansible.executor.task_queue_manager
import
TaskQueueManager
...
@@ -223,7 +225,7 @@ class PlaybookExecutor:
...
@@ -223,7 +225,7 @@ class PlaybookExecutor:
# check to see if the serial number was specified as a percentage,
# check to see if the serial number was specified as a percentage,
# and convert it to an integer value based on the number of hosts
# and convert it to an integer value based on the number of hosts
if
isinstance
(
play
.
serial
,
basestring
)
and
play
.
serial
.
endswith
(
'
%
'
):
if
isinstance
(
play
.
serial
,
string_types
)
and
play
.
serial
.
endswith
(
'
%
'
):
serial_pct
=
int
(
play
.
serial
.
replace
(
"
%
"
,
""
))
serial_pct
=
int
(
play
.
serial
.
replace
(
"
%
"
,
""
))
serial
=
int
((
serial_pct
/
100.0
)
*
len
(
all_hosts
))
serial
=
int
((
serial_pct
/
100.0
)
*
len
(
all_hosts
))
else
:
else
:
...
...
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