Skip to content

Commit da9cc94

Browse files
committed
add traceback when catching exception
1 parent 98c0409 commit da9cc94

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

scripts/automated_ingestion/eessi_task.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,19 +1292,20 @@ def _perform_task_add(self) -> bool:
12921292

12931293
issue_title = f'Failed to add {tarball}'
12941294
log_message(LoggingScope.STATE_OPS, 'INFO',
1295-
'Creating issue for failed ingestion: title: %s',
1295+
"Creating issue for failed ingestion: title: '%s'",
12961296
issue_title)
12971297

12981298
command = ' '.join(ingest_cmd.args)
1299-
issue_body = self.config['github']['failed_ingestion_issue_body'].format(
1299+
failed_ingestion_issue_body = self.config['github']['failed_ingestion_issue_body']
1300+
issue_body = failed_ingestion_issue_body.format(
13001301
command=command,
13011302
tarball=tarball,
13021303
return_code=ingest_cmd.returncode,
13031304
stdout=ingest_cmd.stdout.decode('UTF-8'),
13041305
stderr=ingest_cmd.stderr.decode('UTF-8')
13051306
)
13061307
log_message(LoggingScope.STATE_OPS, 'INFO',
1307-
'Creating issue for failed ingestion: body: %s',
1308+
"Creating issue for failed ingestion: body: '%s'",
13081309
issue_body)
13091310

13101311
if self._issue_exists(issue_title, state='open'):
@@ -1332,7 +1333,7 @@ def _handle_add_approved(self):
13321333
return TaskState.APPROVED
13331334
except Exception as err:
13341335
log_message(LoggingScope.TASK_OPS, 'ERROR',
1335-
"Error performing task action: %s", err)
1336+
"Error performing task action: '%s'\nTraceback:\n%s", err, traceback.format_exc())
13361337
return TaskState.APPROVED
13371338

13381339
@log_function_entry_exit()

0 commit comments

Comments
 (0)