diff options
-rw-r--r-- | import/import.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |