kopia lustrzana https://github.com/sq9atk/sr0wx
Poprawka wyświetlania komunikatów w konsoli
rodzic
9bc0cdfd1e
commit
c3284ef070
|
@ -44,9 +44,9 @@ class PropagationSq9atk(SR0WXModule):
|
|||
webFile.retrieve(url, "propagacja.png")
|
||||
return Image.open("propagacja.png",'r')
|
||||
except socket.timeout:
|
||||
print "Timed out!"
|
||||
print "Timed out!\n"
|
||||
except:
|
||||
print "Data download error!"
|
||||
print "Data download error!\n"
|
||||
return
|
||||
|
||||
def collectBandConditionsFromImage(self, image, dayTime):
|
||||
|
@ -84,6 +84,8 @@ class PropagationSq9atk(SR0WXModule):
|
|||
def get_data(self):
|
||||
image = self.downloadImage(self.__service_url)
|
||||
|
||||
message = '';
|
||||
if image:
|
||||
self.__logger.info("::: Przetwarzam dane...\n")
|
||||
|
||||
day = self.collectBandConditionsFromImage(image, 'day')
|
||||
|
@ -100,8 +102,6 @@ class PropagationSq9atk(SR0WXModule):
|
|||
" _ " .join( night ),
|
||||
" _ "
|
||||
])
|
||||
else:
|
||||
message = ''
|
||||
|
||||
return {
|
||||
"message": message,
|
||||
|
|
Ładowanie…
Reference in New Issue