Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #35 from Skyscanner/encoding
Browse files Browse the repository at this point in the history
Encoding
  • Loading branch information
adeptex authored Dec 16, 2020
2 parents f0d8cb0 + f08beff commit 0ce27da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion whispers/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION = (1, 3, 7)
VERSION = (1, 3, 8)

__version__ = ".".join(map(str, VERSION))
3 changes: 3 additions & 0 deletions whispers/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from argparse import ArgumentParser, Namespace
from os import environ
from pathlib import Path

from whispers.__version__ import __version__
Expand All @@ -7,6 +8,8 @@
from whispers.rules import WhisperRules
from whispers.utils import format_stdout

environ["PYTHONIOENCODING"] = "UTF-8"


def cli_parser() -> ArgumentParser:
args_parser = ArgumentParser("whispers", description=("Identify secrets and dangerous behaviours"))
Expand Down
6 changes: 5 additions & 1 deletion whispers/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pathlib import Path
from typing import Optional

from whispers.log import debug
from whispers.plugins.config import Config
from whispers.plugins.dockerfile import Dockerfile
from whispers.plugins.go import Go
Expand Down Expand Up @@ -80,4 +81,7 @@ def load_plugin(self) -> Optional[object]:

def pairs(self):
if self.plugin:
yield from self.plugin.pairs(self.filepath)
try:
yield from self.plugin.pairs(self.filepath)
except Exception:
debug(f"Failed parsing {self.filepath.as_posix()}")

0 comments on commit 0ce27da

Please sign in to comment.