Просмотр исходного кода

Merge pull request #2738 from candlerb/candlerb/graphviz-exception

Show exception description on failure to render graphviz
Jeremy Stretch 7 лет назад
Родитель
Сommit
a950c95416
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      netbox/extras/api/views.py

+ 2 - 3
netbox/extras/api/views.py

@@ -99,10 +99,9 @@ class TopologyMapViewSet(ModelViewSet):
 
         try:
             data = tmap.render(img_format=img_format)
-        except Exception:
+        except Exception as e:
             return HttpResponse(
-                "There was an error generating the requested graph. Ensure that the GraphViz executables have been "
-                "installed correctly."
+                "There was an error generating the requested graph: %s" % e
             )
 
         response = HttpResponse(data, content_type='image/{}'.format(img_format))