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
5f0f5363
Commit
5f0f5363
authored
Sep 23, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12487 from mgedmin/py3k
Fix one more failing test on Python 3
parents
2898e000
95e655eb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
33 deletions
+78
-33
lib/ansible/inventory/__init__.py
+4
-2
lib/ansible/module_utils/basic.py
+74
-31
No files found.
lib/ansible/inventory/__init__.py
View file @
5f0f5363
...
...
@@ -26,6 +26,8 @@ import re
import
stat
import
itertools
from
six
import
string_types
from
ansible
import
constants
as
C
from
ansible.errors
import
AnsibleError
...
...
@@ -78,7 +80,7 @@ class Inventory(object):
def
parse_inventory
(
self
,
host_list
):
if
isinstance
(
host_list
,
basestring
):
if
isinstance
(
host_list
,
string_types
):
if
","
in
host_list
:
host_list
=
host_list
.
split
(
","
)
host_list
=
[
h
for
h
in
host_list
if
h
and
h
.
strip
()
]
...
...
@@ -589,7 +591,7 @@ class Inventory(object):
def
is_file
(
self
):
""" did inventory come from a file? """
if
not
isinstance
(
self
.
host_list
,
basestring
):
if
not
isinstance
(
self
.
host_list
,
string_types
):
return
False
return
self
.
_loader
.
path_exists
(
self
.
host_list
)
...
...
lib/ansible/module_utils/basic.py
View file @
5f0f5363
This diff is collapsed.
Click to expand it.
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