Skip to content

Commit

Permalink
print traceback
Browse files Browse the repository at this point in the history
  • Loading branch information
wayyoungboy committed Jun 19, 2024
1 parent 002d6a3 commit 581e206
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion core.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from __future__ import absolute_import, division, print_function

import os
import traceback
from optparse import Values
from copy import copy

Expand Down Expand Up @@ -319,7 +320,8 @@ def rca_run(self, opts):
handler.handle()
handler.execute()
except Exception as e:
self.stdio.error(e)
self.stdio.error("rca run Exception: {0}".format(e))
self.stdio.verbose(traceback.format_exc())

def rca_list(self, opts):
config = self.config_manager
Expand Down
9 changes: 7 additions & 2 deletions handler/checker/check_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import os
import queue
import time
import traceback

import yaml

Expand Down Expand Up @@ -168,11 +168,15 @@ def handle(self):
new_tasks[task_name] = task_value
self.tasks = new_tasks
self.stdio.verbose("tasks is {0}".format(self.tasks.keys()))
return True
except Exception as e:
self.stdio.error(e)
self.stdio.error("Get package tasks failed. Error info is {0}".format(e))
self.stdio.verbose(traceback.format_exc())
return False

# get all tasks
def get_all_tasks(self):
self.stdio.verbose("get all tasks")
current_path = self.tasks_base_path
tasks = {}
for root, dirs, files in os.walk(current_path):
Expand Down Expand Up @@ -239,6 +243,7 @@ def execute(self):
self.stdio.error("Report error :{0}".format(e))
except Exception as e:
self.stdio.error("Internal error :{0}".format(e))
self.stdio.verbose(traceback.format_exc())


class checkOBConnectorPool:
Expand Down

0 comments on commit 581e206

Please sign in to comment.