From 2e8351ee52a67bf7dfee7d323458b3fa80cacf41 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 23 Jun 2016 05:43:46 +0000 Subject: Add warnings for adding MySQLdb cursor --- genotype_files/genotype/process.py | 1 + wqflask/utility/AJAX_table.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/genotype_files/genotype/process.py b/genotype_files/genotype/process.py index 96cbc9b4..112dd83a 100644 --- a/genotype_files/genotype/process.py +++ b/genotype_files/genotype/process.py @@ -108,6 +108,7 @@ mysql> select * from Strain order by Id desc limit 5; try: #import getpass #passwd = getpass.getpass('Please enter mysql password here : ') + logger.warning("Creating new MySQLdb cursor (this method is OBSOLETE!)") con = MySQLdb.Connect(db='db_webqtl',user='webqtlupd',passwd='webqtl', host="opteron") cursor = con.cursor() print "You have successfully connected to mysql.\n" diff --git a/wqflask/utility/AJAX_table.py b/wqflask/utility/AJAX_table.py index 083d1c0d..d70acfcd 100644 --- a/wqflask/utility/AJAX_table.py +++ b/wqflask/utility/AJAX_table.py @@ -68,6 +68,8 @@ class AJAX_table: workbook = xl.Writer('%s.xls' % (webqtlConfig.TMPDIR+file)) worksheet = workbook.add_worksheet() + logger.warning("Creating new MySQLdb cursor (this method is OBSOLETE!)") + con = MySQLdb.Connect(db=webqtlConfig.DB_NAME,host=webqtlConfig.MYSQL_SERVER, user=webqtlConfig.DB_USER,passwd=webqtlConfig.DB_PASSWD) cursor = con.cursor() -- cgit v1.2.3