From 12ed70f09714d10107a1a3178921dea2295660f7 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Sun, 21 Jul 2013 00:15:28 -0700 Subject: [PATCH] metar: only add cover if it is not None --- metar.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/metar.py b/metar.py index a78c798..15218fa 100644 --- a/metar.py +++ b/metar.py @@ -124,7 +124,10 @@ class Weather(object): return '?' def __repr__(self): - chunks = [self.cover] + chunks = [] + if self.cover: + chunks.append(self.cover) + chunks.append('{0}°C'.format(self.temperature)) if self.pressure: