Skip to content

Commit

Permalink
[fix] Fixed error log.
Browse files Browse the repository at this point in the history
  • Loading branch information
yoneyan committed Aug 14, 2023
1 parent 05e36c7 commit a178211
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion jpnic_admin/resource/task.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import copy
import datetime
import inspect
import os
import re
import sys
import time

from bs4 import BeautifulSoup
Expand Down Expand Up @@ -69,7 +72,11 @@ def exec_task(type1, base, log, now):
elif type1 == "資源情報":
GetAddr(base=base_copied, log=log_copied, now=now).get_resource()
except Exception as e:
fail = {"type": str(type(e)), "message": str(e)}
exc = sys.exception()
fail = {
"type": str(type(e)),
"message": "[%s] %s" % (str(e), str(inspect.getframeinfo(exc.__traceback__.tb_frame)))
}
update_task_log(type1, base, log, now, fail)


Expand Down

0 comments on commit a178211

Please sign in to comment.