Fix missing brackets in web_ui.py

This commit is contained in:
Paul Schulz 2018-01-06 22:58:28 +10:30
parent e57c2b61a6
commit 62cbf434e1
2 changed files with 7 additions and 7 deletions

View file

@ -61,7 +61,7 @@ class detector():
cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='Events'")
if cursor.fetchone() == None:
cursor.execute('''CREATE TABLE Events
(UTCUnixTime INTEGER, SubSeconds REAL, TempreatureC REAL, Humidity REAL, AccelX REAL,
(UTCUnixTime INTEGER, SubSeconds REAL, TemperatureC REAL, Humidity REAL, AccelX REAL,
AccelY REAL, AccelZ REAL, MagX REAL, MagY REAL, MagZ REAL, Pressure REAL, Longitude REAL,
Latitude REAL, DetectorName TEXT, DetectorVersion TEXT);''')
self._db_conn.commit()

View file

@ -52,7 +52,7 @@ def initDB():
cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='Events'")
if cursor.fetchone() == None:
cursor.execute('''CREATE TABLE Events
(UTCUnixTime INTEGER, SubSeconds REAL, TempreatureC REAL, Humidity REAL, AccelX REAL,
(UTCUnixTime INTEGER, SubSeconds REAL, TemperatureC REAL, Humidity REAL, AccelX REAL,
AccelY REAL, AccelZ REAL, MagX REAL, MagY REAL, MagZ REAL, Pressure REAL, Longitude REAL,
Latitude REAL, DetectorName TEXT, DetectorVersion TEXT);''')
conn.commit()
@ -82,7 +82,7 @@ def getserial():
icon_dict = {
'UTCUnixTime': "fa fa-clock-o fa-5x",
'TempreatureC': "fa fa-thermometer-half fa-5x",
'TemperatureC': "fa fa-thermometer-half fa-5x",
'Humidity': "fa fa-tint fa-5x",
'AccelX': "fa fa-tachometer fa-5x",
'AccelY': "fa fa-tachometer fa-5x",
@ -172,8 +172,8 @@ def get_current_and_available_networks():
try:
connectedNetworkNameResponse = subprocess.check_output(['sudo','iwgetid'])
except subprocess.CalledProcessError as e:
print 'ERROR get connected network: '
print e
print('ERROR get connected network: ')
print(e)
except WindowsError as e:
print("Well, windows just can't do this...")
connectedNetworkNameResponse = '"maybe a windows network?"'
@ -188,8 +188,8 @@ def get_current_and_available_networks():
try:
availableNetworksResponse = subprocess.check_output(['sudo','iw','dev','wlan0','scan'])
except subprocess.CalledProcessError as e:
print 'ERROR get list of networks: '
print e
print('ERROR get list of networks: ')
print(e)
except WindowsError as e:
print("Well, windows just can't do this either...")
availableNetworksResponse = 'SSID: Network A\nSSID: Network B\n'