summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2017-08-17 21:04:43 +0200
committerGitHub <noreply@github.com>2017-08-17 21:04:43 +0200
commit8e0b5800b793c699292c01f48b6074d7cf599c35 (patch)
tree4de54c51ef7e812d655dbc7c3772c538effa5abe /bin
parentBugfix and assorted fixes (#28352) (diff)
downloadansible-8e0b5800b793c699292c01f48b6074d7cf599c35.tar.xz
ansible-8e0b5800b793c699292c01f48b6074d7cf599c35.zip
Miscellaneous ansible-test fixes. (#28355)
* Include .github in test targets. Fix BOTMETA.yml. * Include bin in compile tests. * Exclude links from test targets. * Include bin in pep8 and pylint tests. * Fix pep8 and pylint issues in bin dir.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ansible2
-rwxr-xr-xbin/ansible-connection5
2 files changed, 4 insertions, 3 deletions
diff --git a/bin/ansible b/bin/ansible
index f759543000..ffb79803f7 100755
--- a/bin/ansible
+++ b/bin/ansible
@@ -44,7 +44,7 @@ from ansible.module_utils._text import to_text
########################################
-### OUTPUT OF LAST RESORT ###
+# OUTPUT OF LAST RESORT
class LastResort(object):
def display(self, msg):
print(msg, file=sys.stderr)
diff --git a/bin/ansible-connection b/bin/ansible-connection
index e29c681815..d2d10e71c2 100755
--- a/bin/ansible-connection
+++ b/bin/ansible-connection
@@ -62,7 +62,7 @@ def do_fork():
return pid
# This is done as a 'good practice' for daemons, but we need to keep the cwd
# leaving it here as a note that we KNOW its good practice but are not doing it on purpose.
- #os.chdir("/")
+ # os.chdir("/")
os.setsid()
os.umask(0)
@@ -261,6 +261,7 @@ def communicate(sock, data):
stderr = recv_data(sock)
return (rc, stdout, stderr)
+
def main():
# Need stdin as a byte stream
if PY3:
@@ -304,7 +305,7 @@ def main():
socket_path = unfrackpath(cp % dict(directory=tmp_path))
# if the socket file doesn't exist, spin up the daemon process
- lock_fd = os.open(lock_path, os.O_RDWR|os.O_CREAT, 0o600)
+ lock_fd = os.open(lock_path, os.O_RDWR | os.O_CREAT, 0o600)
fcntl.lockf(lock_fd, fcntl.LOCK_EX)
if not os.path.exists(socket_path):