Skip to content

Commit f8e1e03

Browse files
authored
Merge pull request #49 from JuliaRobotics/fbot/deps
Fix deprecations
2 parents 009fb65 + 79df6ca commit f8e1e03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function troubleshoot()
2727
error("Failed to create LCM instance.")
2828
end
2929

30-
loopback_interface() = chomp(readstring(pipeline(`ifconfig`, `grep -m 1 -i loopback`, `cut -d : -f1`)))
30+
loopback_interface() = chomp(read(pipeline(`ifconfig`, `grep -m 1 -i loopback`, `cut -d : -f1`), String))
3131

3232
function loopback_multicast_setup_advice(lo::AbstractString)
3333
if Sys.isapple()
@@ -43,7 +43,7 @@ function loopback_multicast_setup_advice(lo::AbstractString)
4343
end
4444

4545
function check_loopback_multicast(lo::AbstractString)
46-
pass = if parse(readstring(pipeline(`ifconfig $lo`, `grep -c -i multicast`))) != 0
46+
pass = if Meta.parse(read(pipeline(`ifconfig $lo`, `grep -c -i multicast`), String)) != 0
4747
msg = """Loopback interface $lo is not set to multicast.
4848
The most probable cause for this is that you are not connected to the internet.
4949
See https://lcm-proj.github.io/multicast_setup.html.
@@ -58,9 +58,9 @@ end
5858

5959
function check_multicast_routing(lo::AbstractString)
6060
routing_correct = if Sys.isapple()
61-
chomp(readstring(pipeline(`route get 224.0.0.0 -netmask 240.0.0.0`, `grep -m 1 -i interface`, `cut -f2 -d :`, `tr -d ' '`))) == lo
61+
chomp(read(pipeline(`route get 224.0.0.0 -netmask 240.0.0.0`, `grep -m 1 -i interface`, `cut -f2 -d :`, `tr -d ' '`), String)) == lo
6262
elseif Sys.islinux()
63-
chomp(readstring(pipeline(`ip route get 224.0.0.0`, `grep -m 1 -i dev`, `sed 's/.*dev\s*//g'`, `cut -d ' ' -f1`))) == lo
63+
chomp(read(pipeline(`ip route get 224.0.0.0`, `grep -m 1 -i dev`, `sed 's/.*dev\s*//g'`, `cut -d ' ' -f1`), String)) == lo
6464
else
6565
error("Sorry, I only know how to check multicast routing on Linux and macOS")
6666
end

0 commit comments

Comments
 (0)