From 02bf56bf4aa5331d5aae1785950b12a586482c76 Mon Sep 17 00:00:00 2001 From: PanFritz Date: Fri, 9 Jan 2015 20:47:29 +0100 Subject: [PATCH] Added try except to str converion --- check.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/check.py b/check.py index a9087f9..5822011 100644 --- a/check.py +++ b/check.py @@ -34,7 +34,10 @@ def get_last_seen(player): 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("-", "") + try: + uuid = str(uid(player)).replace("-", "") + except: + print"failed to convert to string" try: curs.execute("SELECT DISTINCT `id`, `email` FROM users WHERE `uuid` = (?) LIMIT 1", (uuid,)) except: