Skip to content

Commit 9400e1c

Browse files
Akshit MaheshwaryAkshit Maheshwary
authored andcommitted
fixed deepsource issues
1 parent 7b9f8a6 commit 9400e1c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

api_app/analyzers_manager/file_analyzers/capa_info.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _download_signatures(cls) -> None:
6666

6767
for signature in signatures_list:
6868
try:
69-
process = subprocess.run(
69+
subprocess.run(
7070
[
7171
"/usr/bin/wget",
7272
"-O",
@@ -77,7 +77,7 @@ def _download_signatures(cls) -> None:
7777
)
7878

7979
except subprocess.CalledProcessError as e:
80-
stderr = process.stderr
80+
stderr = e.stderr
8181
logger.error(f"Failed to download signature: {e}")
8282
raise AnalyzerRunException(
8383
f"Failed to update signatures due to error: {stderr}"
@@ -147,7 +147,7 @@ def run(self):
147147
logger.info("CAPA analysis successfully completed")
148148

149149
except subprocess.CalledProcessError as e:
150-
stderr = process.stderr
150+
stderr = e.stderr
151151
logger.info(f"Capa Info failed to run for {self.filename} with command {e}")
152152
raise AnalyzerRunException(
153153
f" Analyzer for {self.filename} failed with error: {stderr}"

api_app/analyzers_manager/file_analyzers/floss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def run(self):
5454
result = loads(process.stdout)
5555

5656
except subprocess.CalledProcessError as e:
57-
stderr = process.stderr
57+
stderr = e.stderr
5858
logger.info(f"Floss failed to run for {self.filename} with command {e}")
5959
raise AnalyzerRunException(
6060
f" Analyzer for {self.filename} failed with error: {stderr}"

0 commit comments

Comments
 (0)