Skip to content

Commit

Permalink
Linting fixes
Browse files Browse the repository at this point in the history
* Added whitespace after keyword
* Pinned flake8 version to 4.0.1

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
  • Loading branch information
Akasurde committed Aug 19, 2022
1 parent 3461a40 commit f08a72d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Expand Up @@ -23,7 +23,9 @@ RUN if [ "$ANSIBLE_BRANCH" != "" ] ; then \
# NOTE(pabelanger): For downstream builds, we compile everything from source
# over using existing wheels. Do this upstream too so we can better catch
# issues.
ENV PIP_OPTS=--no-build-isolation

# Commenting due to failures in CI
# ENV PIP_OPTS=--no-build-isolation
RUN assemble

FROM $PYTHON_BASE_IMAGE
Expand Down
10 changes: 5 additions & 5 deletions ansible_runner/__main__.py
Expand Up @@ -869,21 +869,21 @@ def main(sys_args=None):
else:
sys.stderr.write(exc)
return 1
return(res.rc)
return res.rc

try:
with open(pidfile, 'r') as f:
pid = int(f.readline())
except IOError:
return(1)
return 1

if vargs.get('command') == 'stop':
Runner.handle_termination(pid, pidfile=pidfile)
return (0)
return 0

elif vargs.get('command') == 'is-alive':
try:
os.kill(pid, signal.SIG_DFL)
return(0)
return 0
except OSError:
return(1)
return 1
4 changes: 2 additions & 2 deletions ansible_runner/cleanup.py
Expand Up @@ -79,9 +79,9 @@ def is_alive(dir):

try:
os.kill(pid, signal.SIG_DFL)
return(0)
return 0
except OSError:
return(1)
return 1


def project_idents(dir):
Expand Down
2 changes: 1 addition & 1 deletion test/requirements.txt
Expand Up @@ -3,5 +3,5 @@ pytest-cov
pytest-mock
pytest-timeout
pytest-xdist
flake8
flake8==4.0.1
yamllint

0 comments on commit f08a72d

Please sign in to comment.