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
c1039de7
Commit
c1039de7
authored
Sep 08, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compatibility with six-1.3.0
parent
30399eda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
contrib/inventory/ec2.py
+3
-3
test/units/parsing/test_data_loader.py
+4
-4
No files found.
contrib/inventory/ec2.py
View file @
c1039de7
...
...
@@ -187,10 +187,10 @@ class Ec2Inventory(object):
def
read_settings
(
self
):
''' Reads the settings from the ec2.ini file '''
if
six
.
PY2
:
config
=
configparser
.
SafeConfigParser
()
else
:
if
six
.
PY3
:
config
=
configparser
.
ConfigParser
()
else
:
config
=
configparser
.
SafeConfigParser
()
ec2_default_ini_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
'ec2.ini'
)
ec2_ini_path
=
os
.
path
.
expanduser
(
os
.
path
.
expandvars
(
os
.
environ
.
get
(
'EC2_INI_PATH'
,
ec2_default_ini_path
)))
config
.
read
(
ec2_ini_path
)
...
...
test/units/parsing/test_data_loader.py
View file @
c1039de7
...
...
@@ -19,7 +19,7 @@
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
six
import
PY
2
from
six
import
PY
3
from
yaml.scanner
import
ScannerError
from
ansible.compat.tests
import
unittest
...
...
@@ -81,10 +81,10 @@ class TestDataLoaderWithVault(unittest.TestCase):
3135306561356164310a343937653834643433343734653137383339323330626437313562306630
3035
"""
if
PY2
:
builtins_name
=
'__builtin__'
else
:
if
PY3
:
builtins_name
=
'builtins'
else
:
builtins_name
=
'__builtin__'
with
patch
(
builtins_name
+
'.open'
,
mock_open
(
read_data
=
vaulted_data
)):
output
=
self
.
_loader
.
load_from_file
(
'dummy_vault.txt'
)
...
...
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