lint: Kill bare excepts

This commit is contained in:
Alexandre Aubin 2021-10-05 12:47:32 +02:00
parent 941cc29438
commit 61ec02c97c
3 changed files with 3 additions and 3 deletions

View file

@ -407,7 +407,7 @@ def is_unit_operation(
if isinstance(value, IOBase):
try:
context[field] = value.name
except:
except Exception:
context[field] = "IOBase"
operation_logger = OperationLogger(op_key, related_to, args=context)

View file

@ -474,7 +474,7 @@ def permission_create(
protected=protected,
sync_perm=sync_perm,
)
except:
except Exception:
permission_delete(permission, force=True)
raise

View file

@ -9,7 +9,7 @@ deps =
py37-mypy: mypy >= 0.900
commands =
py37-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/yunohost/vendor
py37-invalidcode: flake8 src data --exclude src/yunohost/tests,src/yunohost/vendor --select F
py37-invalidcode: flake8 src data --exclude src/yunohost/tests,src/yunohost/vendor --select F,E722
py37-black-check: black --check --diff src doc data tests
py37-black-run: black src doc data tests
py37-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/yunohost/ --exclude (acme_tiny|data_migrations)