summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-19 13:56:49 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-19 13:56:49 +0100
commitc8f755270e710c83556767ebe18bd77621583cdf (patch)
treeace17384fc483715e58f63ab948d3aa83bb370de /src
parentadd weather support (diff)
downloadblueshift-c8f755270e710c83556767ebe18bd77621583cdf.tar.gz
blueshift-c8f755270e710c83556767ebe18bd77621583cdf.tar.bz2
blueshift-c8f755270e710c83556767ebe18bd77621583cdf.tar.xz
m doc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/weather.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/weather.py b/src/weather.py
index c3aa2f9..d5f8a2f 100644
--- a/src/weather.py
+++ b/src/weather.py
@@ -23,14 +23,15 @@ def weather(station):
Get a brief weather report
@param station:str The station's International Civil Aviation Organization airport code
- @return :(sky:str, visiblity:(:int, :float)?, weather:list<str>)
+ @return :(sky:str, visiblity:(:int, :float)?, weather:list<str>)?
The sky condition, visiblity and weather. Sky condition values include
‘clear’, ‘mostly clear’, ‘overcast’, ‘partly cloudy’, ‘mostly cloudy’
and ‘obscured’. The visibility consists of two parameters: the first
on indicates the the visiblity is a upper bound if the value is -1,
a lower bound if +1, and approximate if 0; the second parameter is the
visibility in kilometers. If the visibility is unknown the value will
- be `None`. The weather is a list that can, and often is, empty.
+ be `None`. The weather is a list that can, and often is, empty. `None`
+ is return if observation data cannot be downloaded.
'''
url = 'http://weather.noaa.gov/pub/data/observations/metar/decoded/%s.TXT'
url %= station.upper()