Skip to content

Commit

Permalink
merge issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Oct 23, 2023
1 parent 031d582 commit 15857d2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions credsweeper/deep_scanner/docx_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def data_scan(
depth: int, #
recursive_limit_size: int) -> List[Candidate]:
"""Tries to scan DOCX text with splitting by lines"""
candidates = []
candidates: List[Candidate] = []

try:
docx_lines = []
docx_lines: List[str] = []

doc = docx.Document(io.BytesIO(data_provider.data))
for paragraph in doc.paragraphs:
Expand All @@ -38,7 +38,6 @@ def data_scan(
file_type=data_provider.file_type,
info=f"{data_provider.info}|DOCX")
candidates = self.scanner.scan(string_data_provider)
candidates.extend(candidates)
except Exception as docx_exc:
logger.debug(f"{data_provider.file_path}:{docx_exc}")
return candidates

0 comments on commit 15857d2

Please sign in to comment.