summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
authorPanFritz <redstonenoobpan@gmail.com>2015-01-09 20:45:40 +0100
committerPanFritz <redstonenoobpan@gmail.com>2015-01-09 20:45:40 +0100
commit2295350be6a57f76ec3a7958f0053626f79cac80 (patch)
treec70509f3cd0bd6305e2262c99cda45ce5f41eb27 /check.py
parentdb940cdd6ee276b2243cf87a45cce012725e4f1d (diff)
Added try except
Diffstat (limited to 'check.py')
-rw-r--r--check.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/check.py b/check.py
index de3e3ec..a9087f9 100644
--- a/check.py
+++ b/check.py
@@ -35,7 +35,10 @@ def get_website_data(player):
conn = zxJDBC.connect(mysql_database, mysql_user, mysql_pass, "com.mysql.jdbc.Driver")
curs = conn.cursor()
uuid = str(uid(player)).replace("-", "")
- curs.execute("SELECT DISTINCT `id`, `email` FROM users WHERE `uuid` = (%s) LIMIT 1", (uuid,))
+ try:
+ curs.execute("SELECT DISTINCT `id`, `email` FROM users WHERE `uuid` = (?) LIMIT 1", (uuid,))
+ except:
+ print"Failed to curs.execute"
results = curs.fetchall()
curs.close()
conn.close()