mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Better debugging info when miserably failing to run diagnosis
This commit is contained in:
parent
42293fcce3
commit
ad4c138878
1 changed files with 3 additions and 2 deletions
|
@ -167,7 +167,8 @@ def diagnosis_run(categories=[], force=False):
|
||||||
try:
|
try:
|
||||||
code, report = hook_exec(path, args={"force": force}, env=None)
|
code, report = hook_exec(path, args={"force": force}, env=None)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(m18n.n("diagnosis_failed_for_category", category=category, error=str(e)), exc_info=True)
|
import traceback
|
||||||
|
logger.error(m18n.n("diagnosis_failed_for_category", category=category, error='\n'+traceback.format_exc()))
|
||||||
else:
|
else:
|
||||||
diagnosed_categories.append(category)
|
diagnosed_categories.append(category)
|
||||||
if report != {}:
|
if report != {}:
|
||||||
|
@ -424,7 +425,7 @@ class Diagnoser():
|
||||||
cache_file = Diagnoser.cache_file(id_)
|
cache_file = Diagnoser.cache_file(id_)
|
||||||
if not os.path.exists(cache_file):
|
if not os.path.exists(cache_file):
|
||||||
logger.warning(m18n.n("diagnosis_no_cache", category=id_))
|
logger.warning(m18n.n("diagnosis_no_cache", category=id_))
|
||||||
report = {"id": category,
|
report = {"id": id_,
|
||||||
"cached_for": -1,
|
"cached_for": -1,
|
||||||
"timestamp": -1,
|
"timestamp": -1,
|
||||||
"items": []}
|
"items": []}
|
||||||
|
|
Loading…
Add table
Reference in a new issue