diff options
author | Chris Schlaeger <chris@linux.com> | 2015-08-30 20:19:08 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2015-08-30 20:19:08 +0200 |
commit | 1b02b4c99215272711477bee02f1eda5d38c9270 (patch) | |
tree | 4802cbcd7553619cde72e758a085173b82ce8d76 /lib | |
parent | a128a26ca7f329442e335aed9e0006455e4f9872 (diff) | |
download | postrunner-1b02b4c99215272711477bee02f1eda5d38c9270.zip |
Fix: Don't crash on network failures in EPO downloader.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/postrunner/EPO_Downloader.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/postrunner/EPO_Downloader.rb b/lib/postrunner/EPO_Downloader.rb index 26e6e0d..327bff7 100644 --- a/lib/postrunner/EPO_Downloader.rb +++ b/lib/postrunner/EPO_Downloader.rb @@ -56,9 +56,15 @@ module PostRunner private def get_epo_from_server - res = @http.request(@request) + begin + res = @http.request(@request) + rescue => e + Log.error "Extended Prediction Orbit (EPO) data download error: " + + e.message + return nil + end if res.code.to_i != 200 - Log.error "Extended Orbit Prediction (EPO) data download failed: #{res}" + Log.error "Extended Prediction Orbit (EPO) data download failed: #{res}" return nil end res.body |