Skip to content

Commit 607a552

Browse files
committed
Smarter error checking
1 parent 6b3a9f0 commit 607a552

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ before_script:
1717
- sleep 5
1818
- python test/echonode.py &
1919
- sleep 5
20-
- julia -e 'Pkg.add("PyCall")'
21-
- julia -e 'Pkg.checkout("PyCall")'
2220
after_success:
2321
- julia -e 'cd(Pkg.dir("RobotOS")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
2422
after_script:

src/RobotOS.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ using PyCall
44
const __rospy__ = try
55
pyimport("rospy")
66
catch ex
7-
if ex.val[:args][1] == "No module named rospy"
7+
if (isa(ex, PyCall.PyError) &&
8+
pycall(pybuiltin("str"), PyAny, ex.val) == "No module named rospy")
89
error("rospy not found!\nHas an environment setup script been run?")
10+
else
11+
rethrow(ex)
912
end
1013
end
1114

0 commit comments

Comments
 (0)