Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion ci/travis/before_install_darwin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -xe
#!/bin/sh -e

. ci/travis/lib.sh
. ci/travis/before_install_lib.sh
Expand Down
12 changes: 9 additions & 3 deletions ci/travis/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,22 @@ command_exists() {
ensure_command_exists() {
local cmd="$1"
local package="$2"
local yes_confirm
[ -n "$cmd" ] || return 1
[ -n "$package" ] || package="$cmd"
! command_exists "$cmd" || return 0
# go through known package managers
for pacman in apt-get brew yum ; do
command_exists $pacman || continue
$pacman install -y $package || {
if [ "$pacman" = "brew" ] ; then
yes_confirm=
else
yes_confirm="-y"
fi
"$pacman" install $yes_confirm "$package" || {
# Try an update if install doesn't work the first time
$pacman -y update && \
$pacman install -y $package
"$pacman" $yes_confirm update && \
"$pacman" install $yes_confirm "$package"
}
return $?
done
Expand Down
2 changes: 1 addition & 1 deletion python/iio/attr_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def sender(self):
try:
self.message_port_pub(self.port, msg_dic)
except:
print "Error: Failed to publish message"
print("Error: Failed to publish message")
return

sleep(self.interval/1000)