kopia lustrzana https://github.com/sq9atk/sr0wx
poprawki w module propagacja
rodzic
f702fcb526
commit
d3be1d938d
|
@ -1,5 +1,5 @@
|
|||
*.pyc
|
||||
|
||||
imgwpodest_data/*
|
||||
|
||||
propagacja.png
|
||||
sr0wx.log
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/python -tt
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import urllib2
|
||||
import urllib
|
||||
import logging
|
||||
import socket
|
||||
|
||||
|
@ -37,19 +37,18 @@ class PropagationSq9atk(SR0WXModule):
|
|||
def rgb2hex(self, rgb):
|
||||
return '#%02x%02x%02x' % rgb
|
||||
|
||||
|
||||
def downloadImage(self, url):
|
||||
try:
|
||||
self.__logger.info("::: Odpytuję adres: " + url)
|
||||
webFile = urllib2.urlopen(url, None, 30)
|
||||
return Image.open(webFile)
|
||||
webFile = urllib.URLopener()
|
||||
webFile.retrieve(url, "propagacja.png")
|
||||
return Image.open("propagacja.png",'r')
|
||||
except urllib2.URLError, e:
|
||||
print e
|
||||
except socket.timeout:
|
||||
print "Timed out!"
|
||||
return ""
|
||||
|
||||
|
||||
def collectBandConditionsFromImage(self, image, dayTime):
|
||||
imageData = image.load()
|
||||
data = list()
|
||||
|
|
Ładowanie…
Reference in New Issue