Skip to content

Commit

Permalink
Except also ModuleNotFoundError
Browse files Browse the repository at this point in the history
 This is despite flake8 telling me:

    B014: Redundant exception types in `except (ImportError, ModuleNotFoundError):`.
    Write `except ImportError:`, which catches exactly the same exceptions.

I marked this line as noqa for flake8.
  • Loading branch information
oz123 committed Aug 28, 2022
1 parent 916451f commit b22c8f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vistir/contextmanagers.py
Expand Up @@ -177,7 +177,7 @@ def spinner(
has_yaspin = None
try:
import yaspin
except ImportError:
except (ImportError, ModuleNotFoundError): # noqa
has_yaspin = False
if not nospin:
raise RuntimeError(
Expand Down

0 comments on commit b22c8f4

Please sign in to comment.