Browse Source

fixup! PEP8: Avoid bare exception

Christian Clauss 4 years ago
parent
commit
1d65ed251a
2 changed files with 2 additions and 2 deletions
  1. 1 1
      .github/workflows/lint_python.yml
  2. 1 1
      src/rembg/bg.py

+ 1 - 1
.github/workflows/lint_python.yml

@@ -12,7 +12,7 @@ jobs:
       - run: bandit --recursive --skip B101,B104,B310,B311 .
       - run: black --check --diff .
       - run: codespell
-      - run: flake8 . --count --ignore=E203,E266,E722,E731,F401,F811,F841,W503
+      - run: flake8 . --count --ignore=E203,E266,E731,F401,F811,F841,W503
                       --max-complexity=10 --max-line-length=103 --show-source --statistics
       - run: isort --check-only --profile black .
       - run: pip install -r requirements.txt

+ 1 - 1
src/rembg/bg.py

@@ -101,7 +101,7 @@ def remove(
                 alpha_matting_erode_structure_size,
                 alpha_matting_base_size,
             )
-        except:
+        except Exception:
             cutout = naive_cutout(img, mask)
     else:
         cutout = naive_cutout(img, mask)