ToastFreeware
/
chrisu
/
seepark.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7756a73
)
merge web/owm.py into master
author
gregor herrmann
<gregor@toastfreeware.priv.at>
Wed, 29 Aug 2018 12:44:42 +0000
(14:44 +0200)
committer
gregor herrmann
<gregor@toastfreeware.priv.at>
Wed, 29 Aug 2018 14:24:09 +0000
(16:24 +0200)
owm.py
patch
|
blob
|
history
diff --git
a/owm.py
b/owm.py
index bc99170166e84749414d76602e0c64f1802a8d77..74fe6c48e2e0fdb30eaa8e3c4aa3a478d0543281 100755
(executable)
--- a/
owm.py
+++ b/
owm.py
@@
-93,7
+93,7
@@
def write_db(config, url, weather_json, weather_data):
sql = 'insert ignore into openweathermap ({}) values ({})'.format(', '.join(sql_columns), ','.join(['%s'] * len(sql_columns)))
with warnings.catch_warnings():
# ignore _mysql_exceptions.Warning: Duplicate entry '3319578-2018-08-01 20:50:00' for key 'cityid_datetime'
- warnings.simplefilter("ignore", category=MySQLdb.cursors.Warning)
+ warnings.simplefilter("ignore", category=MySQLdb.cursors.Warning)
conn.execute(sql, *sql_values)
conn.close()