From c0691104fb1397880293196ed21bebf665e8e57e Mon Sep 17 00:00:00 2001 From: Jim Rollenhagen Date: Wed, 31 Dec 2014 00:13:08 +0000 Subject: [PATCH] Run pep8 on files in bin/ Files in bin/ don't have a .py extension, and so don't get picked up by flake8. Add them to the flake8 command to have them checked. Also fix an existing error in bin/pyghmicons. Change-Id: I4db9b8c4e13c7c7f652acaa12add125f0e0458cd --- bin/pyghmicons | 2 +- tox.ini | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/pyghmicons b/bin/pyghmicons index 6c877cb..aca9b55 100755 --- a/bin/pyghmicons +++ b/bin/pyghmicons @@ -78,7 +78,7 @@ try: inputthread.daemon = True inputthread.start() sol.main_loop() -except: +except Exception: currfl = fcntl.fcntl(sys.stdin.fileno(), fcntl.F_GETFL) fcntl.fcntl(sys.stdin.fileno(), fcntl.F_SETFL, currfl ^ os.O_NONBLOCK) termios.tcsetattr(sys.stdin, termios.TCSANOW, tcattr) diff --git a/tox.ini b/tox.ini index 4ce9f7f..9a7015c 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,8 @@ sitepackages = True downloadcache = ~/cache/pip [testenv:pep8] -commands = flake8 +whitelist_externals = bash +commands = bash -c 'flake8 pyghmi bin/*' [testenv:cover] setenv = VIRTUAL_ENV={envdir}