metar: only add cover if it is not None
This commit is contained in:
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:
|
||||||
|
|||||||
Reference in New Issue
Block a user