Skip to content

Commit

Permalink
Merge pull request #223 from GabrielGanne/gtk-runtime-error-fix
Browse files Browse the repository at this point in the history
Fix scapy init when gtk is not available
  • Loading branch information
guedou committed Jul 19, 2016
2 parents b859999 + bc0195b commit b4d3d2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scapy/arch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
else:
MATPLOTLIB_INLINED = 0
MATPLOTLIB_DEFAULT_PLOT_KARGS = {"marker": "+"}
except ImportError:
# RuntimeError to catch gtk "Cannot open display" error
except (ImportError, RuntimeError) as e:
plt = None
MATPLOTLIB = 0
MATPLOTLIB_INLINED = 0
Expand Down

0 comments on commit b4d3d2f

Please sign in to comment.