Skip to content

Commit

Permalink
Remove potentially-infinite retry loop
Browse files Browse the repository at this point in the history
  • Loading branch information
decklin committed Feb 14, 2011
1 parent 0acaf62 commit 4e495fa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contrib/twitpull
Expand Up @@ -58,10 +58,8 @@ multi_page() {
cursor=-1
while [ -n "$cursor" -a "$cursor" != 0 ]; do
temp=$(mktemp -t twitpull.XXXXXX)
until file $temp | grep -q XML; do
curlicue -f "$creds" -- \
-s "$url?cursor=$cursor${params:+&$params}" > $temp
done
curlicue -f "$creds" -- \
-s "$url?cursor=$cursor${params:+&$params}" > $temp
xmlstarlet sel -t "$@" -n $temp
cursor=$(xmlstarlet sel -t -v //next_cursor $temp)
rm $temp
Expand Down

0 comments on commit 4e495fa

Please sign in to comment.