Skip to content

Commit de087d1

Browse files
committed
Account for error
1 parent 7ff0f4a commit de087d1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

modules/post/multi/manage/play_youtube.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@ def osx_start_video(id)
4444
script << %Q|-e 'activate application "Safari"' |
4545
script << %Q|-e 'tell application "System Events" to key code {59, 55, 3}'|
4646

47-
cmd_exec(script)
47+
begin
48+
cmd_exec(script)
49+
rescue EOFError
50+
return false
51+
end
52+
53+
true
4854
end
4955

5056
#

0 commit comments

Comments
 (0)