aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-03-16 20:11:25 +0100
committerMattias Andrée <maandree@operamail.com>2015-03-16 20:11:25 +0100
commit437f03d8299fcbcbc36d427a44de39aa62dc917a (patch)
tree8b750ce967239c87aeb22be99695c1fed4a792bb /src
parentderp (diff)
downloadxpybar-437f03d8299fcbcbc36d427a44de39aa62dc917a.tar.gz
xpybar-437f03d8299fcbcbc36d427a44de39aa62dc917a.tar.bz2
xpybar-437f03d8299fcbcbc36d427a44de39aa62dc917a.tar.xz
update leapsec plugin
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/plugins/leapsec.py5
1 files changed, 4 insertions, 1 deletions
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')