Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Oct 20, 2017
1 parent 5444c5b commit 8874018
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .ci/travis/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ if [ "$PYVER" == "2.7" ] || [ "$PYVER" == "3.6" ]; then
PSUTIL_TESTING=1 python -Wa psutil/tests/test_memory_leaks.py
# run linter (on Linux only)
if [[ "$(uname -s)" != 'Darwin' ]]; then
python -Wa -m flake8
python -m flake8
fi
fi
3 changes: 3 additions & 0 deletions psutil/tests/test_posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,21 @@ def ps(cmd):
# to get the cmdline (with args) we have to use "args" on AIX and
# Solaris, and can use "command" on all others.


def ps_name(pid):
field = "command"
if SUNOS:
field = "comm"
return ps("ps --no-headers -o %s -p %s" % (field, pid)).split(' ')[0]


def ps_args(pid):
field = "command"
if AIX or SUNOS:
field = "args"
return ps("ps --no-headers -o %s -p %s" % (field, pid))


@unittest.skipIf(not POSIX, "POSIX only")
class TestProcess(unittest.TestCase):
"""Compare psutil results against 'ps' command line utility (mainly)."""
Expand Down
2 changes: 1 addition & 1 deletion scripts/internal/winmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def flake8():
py_files = py_files.decode()
py_files = [x for x in py_files.split() if x.endswith('.py')]
py_files = ' '.join(py_files)
sh("%s -Wa -m flake8 %s" % (PYTHON, py_files), nolog=True)
sh("%s -m flake8 %s" % (PYTHON, py_files), nolog=True)


@cmd
Expand Down

0 comments on commit 8874018

Please sign in to comment.