summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@ens-lyon.org>2012-02-28 22:49:55 +0100
committerGuilhem Moulin <guilhem.moulin@ens-lyon.org>2012-02-28 22:49:55 +0100
commit5fa34813766476867bd1921a2bc01d59993532ec (patch)
tree2c4ea395e31cf9683e621fcc436d2c3fbae85b4f
parent51ba26bc02dfdda6a4ad67c84bfe3e4bbea0955c (diff)
ssl
-rwxr-xr-ximdb-ratings.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/imdb-ratings.py b/imdb-ratings.py
index d66aa21..80df32f 100755
--- a/imdb-ratings.py
+++ b/imdb-ratings.py
@@ -149,10 +149,15 @@ if VERBOSE:
print 'Connecting to the VideoDB database... ',
sys.stdout.flush()
try:
- db = MySQLdb.connect(db=confset['db_database'], host=confset['db_server'],
- user=confset['db_user'], passwd=confset['db_password'],
- charset=confset['db_charset'],
- ssl=confset['db_ssl'])
+ db_ssl = confset['db_ssl'];
+ if db_ssl: db_ssl = eval (db_ssl)
+ db = MySQLdb.connect( db = confset['db_database'],
+ host = confset['db_server'],
+ user = confset['db_user'],
+ passwd = confset['db_password'],
+ charset = confset['db_charset'],
+ ssl = db_ssl
+ )
curs = db.cursor()
except MySQLdb.Error, e:
print '\nUnable to connect to the database.'