Skip to content

Commit

Permalink
break out earlier if working gui not found (possibly related to Julia…
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Sep 13, 2013
1 parent 7c59b3e commit be1dc2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/PyPlot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ end
const backend, gui = begin
const gui2matplotlib = [ :wx=>"WXAgg", :gtk=>"GTKAgg", :qt=>"Qt4Agg" ]
try
local gui::Symbol
local gui::Symbol = :none
if PyCall.gui == :default
# try to ensure that GUI both exists and has a matplotlib backend
for g in (:qt, :wx, :gtk)
Expand All @@ -58,6 +58,9 @@ const backend, gui = begin
end
end
end
if gui == :none
error("no gui found") # go to catch clause below
end
else
gui = pygui()
matplotlib[:use](gui2matplotlib[gui])
Expand Down

0 comments on commit be1dc2c

Please sign in to comment.