From 437f03d8299fcbcbc36d427a44de39aa62dc917a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 16 Mar 2015 20:11:25 +0100 Subject: update leapsec plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/plugins/leapsec.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/leapsec.py b/src/plugins/leapsec.py index ec8cfa1..39a6be4 100644 --- a/src/plugins/leapsec.py +++ b/src/plugins/leapsec.py @@ -48,8 +48,11 @@ class LeapSeconds: ''' Constructor ''' - url = 'http://maia.usno.navy.mil/ser7/leapsec.dat' + #url = 'http://maia.usno.navy.mil/ser7/leapsec.dat' ## gone! + url = 'http://oceandata.sci.gsfc.nasa.gov/Ancillary/LUTs/modis/leapsec.dat' announcements = spawn_read('curl', url) + while not announcements.startswith(' '): + announcements = '\n'.join(announcements.split('\n')[1:]) while ' ' in announcements: announcements = announcements.replace(' ', ' ') announcements = announcements.replace('= ', '=').replace('=JD ', '=JD') -- cgit v1.2.3-70-g09d2