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
be300b56
Commit
be300b56
authored
Oct 30, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pyflakes fixes (mostly unused imports, unused vars)
parent
c0747b7b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
22 deletions
+3
-22
bin/ansible-playbook
+0
-1
lib/ansible/constants.py
+0
-1
lib/ansible/template.py
+1
-13
lib/ansible/utils.py
+2
-7
No files found.
bin/ansible-playbook
View file @
be300b56
...
...
@@ -18,7 +18,6 @@
#######################################################
import
os
import
sys
import
getpass
...
...
lib/ansible/constants.py
View file @
be300b56
...
...
@@ -18,7 +18,6 @@
import
os
import
pwd
import
ConfigParser
import
traceback
def
get_config
(
p
,
section
,
key
,
env_var
,
default
):
if
env_var
is
not
None
:
...
...
lib/ansible/template.py
View file @
be300b56
...
...
@@ -15,22 +15,15 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
import
sys
import
os
import
shlex
import
re
import
codecs
import
jinja2
import
yaml
import
operator
import
json
from
ansible
import
errors
from
ansible
import
__version__
import
ansible.constants
as
C
import
time
import
StringIO
import
imp
import
glob
import
subprocess
import
datetime
import
pwd
...
...
@@ -87,7 +80,6 @@ def _varFind(text, vars, depth=0):
is_complex
=
False
brace_level
=
0
end
=
var_start
path
=
[]
part_start
=
(
var_start
,
brace_level
)
space
=
vars
while
end
<
len
(
text
)
and
((
is_complex
and
brace_level
>
0
)
or
not
is_complex
):
...
...
@@ -195,10 +187,7 @@ def varReplaceWithItems(basedir, varname, vars):
if
not
m
:
return
varname
if
m
[
'start'
]
==
0
and
m
[
'end'
]
==
len
(
varname
):
try
:
return
varReplaceWithItems
(
basedir
,
m
[
'replacement'
],
vars
)
except
VarNotFoundException
:
return
varname
return
varReplaceWithItems
(
basedir
,
m
[
'replacement'
],
vars
)
else
:
return
template
(
basedir
,
varname
,
vars
)
elif
isinstance
(
varname
,
(
list
,
tuple
)):
...
...
@@ -214,7 +203,6 @@ def varReplaceWithItems(basedir, varname, vars):
def
template
(
basedir
,
text
,
vars
,
expand_lists
=
False
):
''' run a text buffer through the templating engine until it no longer changes '''
prev_text
=
''
try
:
text
=
text
.
decode
(
'utf-8'
)
except
UnicodeEncodeError
:
...
...
lib/ansible/utils.py
View file @
be300b56
...
...
@@ -18,9 +18,6 @@
import
sys
import
os
import
shlex
import
re
import
codecs
import
jinja2
import
yaml
import
optparse
import
operator
...
...
@@ -32,12 +29,9 @@ import time
import
StringIO
import
imp
import
glob
import
subprocess
import
stat
import
termios
import
tty
import
datetime
import
pwd
VERBOSITY
=
0
...
...
@@ -60,6 +54,7 @@ except:
KEYCZAR_AVAILABLE
=
False
try
:
import
keyczar.errors
as
key_errors
from
keyczar.keys
import
AesKey
KEYCZAR_AVAILABLE
=
True
except
ImportError
:
...
...
@@ -99,7 +94,7 @@ def encrypt(key, msg):
def
decrypt
(
key
,
msg
):
try
:
return
key
.
Decrypt
(
msg
)
except
key
czar
.
errors
.
InvalidSignatureError
:
except
key
_
errors
.
InvalidSignatureError
:
raise
errors
.
AnsibleError
(
"decryption failed"
)
###############################################################
...
...
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