aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorZachary Sloan2012-10-26 17:02:42 -0500
committerZachary Sloan2012-10-26 17:02:42 -0500
commit5083b031f0041f6df3c99180bd06243625af728e (patch)
tree4803154fcb7858f1a78103fc93f043ca790795a8 /wqflask/base
parent82bcb31455d658a462bfde711c862480fc9acd05 (diff)
downloadgenenetwork2-5083b031f0041f6df3c99180bd06243625af728e.tar.gz
Got search page working for mice with a single gene search
Diffstat (limited to 'wqflask/base')
-rwxr-xr-xwqflask/base/templatePage.py20
-rwxr-xr-xwqflask/base/webqtlTrait.py2
2 files changed, 11 insertions, 11 deletions
diff --git a/wqflask/base/templatePage.py b/wqflask/base/templatePage.py
index 7ef58a72..a94d5153 100755
--- a/wqflask/base/templatePage.py
+++ b/wqflask/base/templatePage.py
@@ -155,29 +155,29 @@ class templatePage:
def openMysql(self):
try:
- self.con = MySQLdb.Connect(db=webqtlConfig.DB_NAME,host=webqtlConfig.MYSQL_SERVER, \
+ self.db_conn = MySQLdb.Connect(db=webqtlConfig.DB_NAME,host=webqtlConfig.MYSQL_SERVER, \
user=webqtlConfig.DB_USER,passwd=webqtlConfig.DB_PASSWD)
- self.cursor = self.con.cursor()
- return 1
- except:
+ self.cursor = self.db_conn.cursor()
+ return True
+ except Exception:
heading = "Connect MySQL Server"
detail = ["Can't connect to MySQL server on '"+ webqtlConfig.MYSQL_SERVER+"':100061. \
The server may be down at this time"]
self.error(heading=heading,detail=detail,error="Error 2003")
- return 0
+ return False
def updMysql(self):
try:
- self.con = MySQLdb.Connect(db=webqtlConfig.DB_UPDNAME,host=webqtlConfig.MYSQL_UPDSERVER, \
+ self.db_conn = MySQLdb.Connect(db=webqtlConfig.DB_UPDNAME,host=webqtlConfig.MYSQL_UPDSERVER, \
user=webqtlConfig.DB_UPDUSER,passwd=webqtlConfig.DB_UPDPASSWD)
- self.cursor = self.con.cursor()
- return 1
- except:
+ self.cursor = self.db_conn.cursor()
+ return True
+ except Exception:
heading = "Connect MySQL Server"
detail = ["update: Can't connect to MySQL server on '"+ webqtlConfig.MYSQL_UPDSERVER+"':100061. \
The server may be down at this time "]
self.error(heading=heading,detail=detail,error="Error 2003")
- return 0
+ return False
def error(self,heading="",intro=[],detail=[],title="Error",error="Error"):
'generating a WebQTL style error page'
diff --git a/wqflask/base/webqtlTrait.py b/wqflask/base/webqtlTrait.py
index d6d537b7..46af6683 100755
--- a/wqflask/base/webqtlTrait.py
+++ b/wqflask/base/webqtlTrait.py
@@ -67,7 +67,7 @@ class webqtlTrait:
''', self.name)
self.riset = self.cursor.fetchone()[0]
else:
- self.riset = self.db.getRISet()
+ self.riset = self.db.get_group()
#
# In ProbeSet, there are maybe several annotations match one sequence