Skip to content
Snippets Groups Projects
Commit b4d3d2f1 authored by Guillaume Valadon's avatar Guillaume Valadon Committed by GitHub
Browse files

Merge pull request #223 from GabrielGanne/gtk-runtime-error-fix

Fix scapy init when gtk is not available
parents b859999d bc0195ba
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,8 @@ try: ...@@ -21,7 +21,8 @@ try:
else: else:
MATPLOTLIB_INLINED = 0 MATPLOTLIB_INLINED = 0
MATPLOTLIB_DEFAULT_PLOT_KARGS = {"marker": "+"} MATPLOTLIB_DEFAULT_PLOT_KARGS = {"marker": "+"}
except ImportError: # RuntimeError to catch gtk "Cannot open display" error
except (ImportError, RuntimeError) as e:
plt = None plt = None
MATPLOTLIB = 0 MATPLOTLIB = 0
MATPLOTLIB_INLINED = 0 MATPLOTLIB_INLINED = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment