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
d3666f32
Commit
d3666f32
authored
Jan 26, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make py2.4 remote checksum large-file-enabled as well
parent
bbd08cd0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/ansible/runner/shell_plugins/sh.py
+1
-1
v2/ansible/plugins/shell/sh.py
+1
-1
No files found.
lib/ansible/runner/shell_plugins/sh.py
View file @
d3666f32
...
...
@@ -99,7 +99,7 @@ class ShellModule(object):
test
=
"rc=flag; [ -r
\'
%(p)
s
\'
] || rc=2; [ -f
\'
%(p)
s
\'
] || rc=1; [ -d
\'
%(p)
s
\'
] && rc=3;
%(i)
s -V 2>/dev/null || rc=4; [ x
\"
$rc
\"
!=
\"
xflag
\"
] && echo
\"
${rc}
\"\'
%(p)
s
\'
&& exit 0"
%
dict
(
p
=
path
,
i
=
python_interp
)
csums
=
[
"(
%
s -c 'import hashlib; BLOCKSIZE = 65536; hasher = hashlib.sha1();
\n
afile = open(
\"
%
s
\"
,
\"
rb
\"
)
\n
buf = afile.read(BLOCKSIZE)
\n
while len(buf) > 0:
\n\t
hasher.update(buf)
\n\t
buf = afile.read(BLOCKSIZE)
\n
afile.close()
\n
print(hasher.hexdigest())' 2>/dev/null)"
%
(
python_interp
,
path
),
# Python > 2.4 (including python3)
"(
%
s -c 'import sha;
print(sha.sha(open(
\"
%
s
\"
,
\"
rb
\"
).read()).hexdigest())' 2>/dev/null)"
%
(
python_interp
,
path
),
# Python == 2.4
"(
%
s -c 'import sha;
BLOCKSIZE = 65536; hasher = sha.sha1();
\n
afile = open(
\"
%
s
\"
,
\"
rb
\"
)
\n
buf = afile.read(BLOCKSIZE)
\n
while len(buf) > 0:
\n\t
hasher.update(buf)
\n\t
buf = afile.read(BLOCKSIZE)
\n
afile.close()
\n
print(hasher.hexdigest())' 2>/dev/null)"
%
(
python_interp
,
path
),
# Python == 2.4
]
cmd
=
" || "
.
join
(
csums
)
...
...
v2/ansible/plugins/shell/sh.py
View file @
d3666f32
...
...
@@ -99,7 +99,7 @@ class ShellModule(object):
test
=
"rc=flag; [ -r
\'
%(p)
s
\'
] || rc=2; [ -f
\'
%(p)
s
\'
] || rc=1; [ -d
\'
%(p)
s
\'
] && rc=3;
%(i)
s -V 2>/dev/null || rc=4; [ x
\"
$rc
\"
!=
\"
xflag
\"
] && echo
\"
${rc}
\"\'
%(p)
s
\'
&& exit 0"
%
dict
(
p
=
path
,
i
=
python_interp
)
csums
=
[
"(
%
s -c 'import hashlib; BLOCKSIZE = 65536; hasher = hashlib.sha1();
\n
afile = open(
\"
%
s
\"
,
\"
rb
\"
)
\n
buf = afile.read(BLOCKSIZE)
\n
while len(buf) > 0:
\n\t
hasher.update(buf)
\n\t
buf = afile.read(BLOCKSIZE)
\n
afile.close()
\n
print(hasher.hexdigest())' 2>/dev/null)"
%
(
python_interp
,
path
),
# Python > 2.4 (including python3)
"(
%
s -c 'import sha;
print(sha.sha(open(
\"
%
s
\"
,
\"
rb
\"
).read()).hexdigest())' 2>/dev/null)"
%
(
python_interp
,
path
),
# Python == 2.4
"(
%
s -c 'import sha;
BLOCKSIZE = 65536; hasher = sha.sha1();
\n
afile = open(
\"
%
s
\"
,
\"
rb
\"
)
\n
buf = afile.read(BLOCKSIZE)
\n
while len(buf) > 0:
\n\t
hasher.update(buf)
\n\t
buf = afile.read(BLOCKSIZE)
\n
afile.close()
\n
print(hasher.hexdigest())' 2>/dev/null)"
%
(
python_interp
,
path
),
# Python == 2.4
]
cmd
=
" || "
.
join
(
csums
)
...
...
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