metar: only add cover if it is not None

master
mutantmonkey 2013-07-21 00:15:28 -07:00
parent 3783e9af85
commit 12ed70f097
1 changed files with 4 additions and 1 deletions

View File

@ -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: