Skip to content

Commit 370ccb6

Browse files
author
izar tarandach
committed
fix: Correct file opening in _add_threats to iterate over threat files
1 parent 7be52ea commit 370ccb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytm/pytm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,9 @@ def _init_threats(self):
836836

837837
def _add_threats(self):
838838

839-
for threat_file_path in self.threatsFile:
839+
for threat_file in self.threatsFile:
840840
try:
841-
with open(self.threatsFile, "r", encoding="utf8") as threat_file:
841+
with open(threat_file, "r", encoding="utf8") as threat_file:
842842
threats_json = json.load(threat_file)
843843
except (FileNotFoundError, PermissionError, IsADirectoryError) as e:
844844
raise UIError(

0 commit comments

Comments
 (0)