mirror of
https://github.com/mewtek/i2ME-Legacy.git
synced 2025-05-14 18:21:05 -05:00
Exception handling for writing AirQuality
This commit is contained in:
parent
1ff7731501
commit
f7314f286f
@ -53,6 +53,7 @@ def writeData():
|
||||
|
||||
# Check to see if we even have EPA ids, as some areas don't have air quality reports
|
||||
if (useData):
|
||||
try:
|
||||
header = '<Data type="AirQuality">'
|
||||
footer = "</Data>"
|
||||
|
||||
@ -88,6 +89,8 @@ def writeData():
|
||||
|
||||
os.remove("D:\\AirQuality.i2m")
|
||||
os.remove("D:\\AirQuality.gz")
|
||||
except Exception as e:
|
||||
print("AirQuality failed to write, problably was expired and was sticking around in the IBM api.")
|
||||
else:
|
||||
print("Ignoring AirQuality data collection -- No working EPA Ids.")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user