From 93c3d92af8139fb9d91b87f46feb42875a84c09e Mon Sep 17 00:00:00 2001 From: Simon Szustkowski Date: Sat, 10 Nov 2012 18:24:27 +0100 Subject: [PATCH] Problem mit duplicate tweets gefixt --- bot.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bot.rb b/bot.rb index 1c0f224..a68f926 100755 --- a/bot.rb +++ b/bot.rb @@ -44,5 +44,9 @@ if (last_status != $current_status) end $config['worker']['last_status'] = status File.open(CONFIG_FILE, 'w') { |f| YAML.dump($config, f) } - client.update(tweet, {:lat => "51.527611", :lon => "7.464944", :display_coordinates => "true"}) + begin + client.update(tweet, {:lat => "51.527611", :lon => "7.464944", :display_coordinates => "true"}) + rescue + # Nothing to do here + end end