Fix flake8 issues
authorMichael Prokop <mika@grml.org>
Tue, 7 Jul 2020 14:03:23 +0000 (16:03 +0200)
committerMichael Prokop <mika@grml.org>
Tue, 7 Jul 2020 14:21:04 +0000 (16:21 +0200)
commitac9f682344c9065c7e6259020c616166785263de
tree6b351b7ec82ed7e14e8674def238cf5bd77bb4b1
parentaf8390f0f9cbd43cdadfa9e274f71edc18ad525a
Fix flake8 issues

1) Drop unused import (fileinput)

Fixes:

| F401 'fileinput' imported but unused

2) Quoting from https://www.flake8rules.com/rules/E722.html:

| A bare except: clause will catch SystemExit and KeyboardInterrupt
| exceptions, making it harder to interrupt a program with Control-C, and
| can disguise other problems. If you want to catch all exceptions that
| signal program errors, use except Exception: (bare except is equivalent
| to except BaseException:).

Fixes:

| E722  do not use bare except, specify exception instead

3) Quoting from https://www.flake8rules.com/rules/E713.html:

| Tests for membership should use the form x not in the_list rather than
| not x in the_list. The former example is simply more readable.

Fixes:

| E713 test for membership should be 'not in'
grml-x