diff options
author | matthew <matthew> | 2008-05-02 13:45:18 +0000 |
---|---|---|
committer | matthew <matthew> | 2008-05-02 13:45:18 +0000 |
commit | ff4bca195d17f827c64515b4afbf8514455fb52b (patch) | |
tree | 168ffd75e05da336ee3e8678a7ca5639afa3a781 | |
parent | 08ae5c26a90cc67e8a3b9b4f5f57e81688e0d78a (diff) |
Stop error emails when no response from flickr API.
-rwxr-xr-x | bin/import-flickr | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/import-flickr b/bin/import-flickr index 67c0cd7d0..4d120c32a 100755 --- a/bin/import-flickr +++ b/bin/import-flickr @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: import-flickr,v 1.5 2007-06-18 15:31:00 matthew Exp $ +# $Id: import-flickr,v 1.6 2008-05-02 13:45:18 matthew Exp $ use strict; require 5.8.0; @@ -41,7 +41,9 @@ my $url = 'http://api.flickr.com/services/rest/?method=flickr.photos.search&tags my $ids = select_all('select nsid from flickr'); my $result = ''; foreach (@$ids) { - $result .= get($url . $_->{nsid}); + my $api_lookup = get($url . $_->{nsid}); + next unless $api_lookup; + $result .= $api_lookup; } my %ids; |