metar: only add cover if it is not None
parent
3783e9af85
commit
12ed70f097
5
metar.py
5
metar.py
|
@ -124,7 +124,10 @@ class Weather(object):
|
||||||
return '?'
|
return '?'
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
chunks = [self.cover]
|
chunks = []
|
||||||
|
if self.cover:
|
||||||
|
chunks.append(self.cover)
|
||||||
|
|
||||||
chunks.append('{0}°C'.format(self.temperature))
|
chunks.append('{0}°C'.format(self.temperature))
|
||||||
|
|
||||||
if self.pressure:
|
if self.pressure:
|
||||||
|
|
Loading…
Reference in New Issue