From 7642211af1be9a6fd15fb50f2b31350487c3fe14 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 26 Apr 2022 16:47:16 +0200 Subject: import.py: make pymysql.connect call explicit --- import/import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import/import.py b/import/import.py index 24a871c..2c22363 100644 --- a/import/import.py +++ b/import/import.py @@ -19,7 +19,7 @@ filename = os.path.basename(sys.argv[1]) ip = re.search('_([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})[_\.]', filename).group(1) -db = pymysql.connect(c.get('db', 'host'), c.get('db', 'username'), c.get('db', 'password'), c.get('db', 'name'), cursorclass=pymysql.cursors.DictCursor) +db = pymysql.connect(host=c.get('db', 'host'), user=c.get('db', 'username'), password=c.get('db', 'password'), database=c.get('db', 'name'), charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor) cursor = db.cursor() # Check if ip is already in names table -- cgit v1.2.3-55-g7522