Skip to content

Commit

Permalink
fix: don't remove cache dir if it doesn't exist (FileNotFoundError)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Mar 13, 2019
1 parent 6111be2 commit d5b6ec9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flake8_nitpick/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def rmdir_if_empty(path_or_str: PathOrStr):
try:
next(path.iterdir())
except StopIteration:
path.rmdir()
if path.exists():
path.rmdir()


def search_dict(jmespath_expression: Union[ParsedResult, str], data: JsonDict, default: Any) -> Any:
Expand Down

0 comments on commit d5b6ec9

Please sign in to comment.