Skip to content

Commit 19476cb

Browse files
committed
Remove too broad try-catch for subprocess.py
1 parent 73d01d4 commit 19476cb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

aikido_zen/sinks/subprocess.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
Sink module for `subprocess`
33
"""
44

5+
from collections.abc import Iterable
6+
57
import aikido_zen.vulnerabilities as vulns
68
from aikido_zen.helpers.get_argument import get_argument
79
from aikido_zen.helpers.register_call import register_call
810
from aikido_zen.sinks import on_import, patch_function, before
911

1012

1113
def try_join_iterable(iterable):
12-
try:
13-
return " ".join(iterable)
14-
except Exception:
14+
if not isinstance(iterable, Iterable):
1515
return None
16+
return " ".join(iterable)
1617

1718

1819
@before

0 commit comments

Comments
 (0)