summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFélix Sipma <gueux@gueux.org>2012-02-27 10:52:18 +0100
committerFélix Sipma <gueux@gueux.org>2012-02-27 10:52:18 +0100
commit51ba26bc02dfdda6a4ad67c84bfe3e4bbea0955c (patch)
treef2c92c723e2b6c33130e2b896f7bb0d592175c0a
parent3fb67dd638f1cbadd52d674de27d017ca87a2a30 (diff)
remove db_options, add db_ssl
-rwxr-xr-ximdb-ratings.py12
-rw-r--r--vdbpyrc2
2 files changed, 7 insertions, 7 deletions
diff --git a/imdb-ratings.py b/imdb-ratings.py
index 0be84ae..d66aa21 100755
--- a/imdb-ratings.py
+++ b/imdb-ratings.py
@@ -29,7 +29,7 @@ confset = { # Parameters to connect to the database.
'db_database': '',
'db_user': '',
'db_charset': 'utf8',
- 'db_options': {},
+ 'db_ssl': {},
}
#################################################################
@@ -135,8 +135,8 @@ if conffile.has_option('config', 'vdb_user'):
if conffile.has_option('config', 'db_prefix'):
VDB_PREFIX = conffile.get('config', 'db_prefix') or None
-if conffile.has_option('config', 'db_options'):
- confset['db_options'] = conffile.get('config', 'db_options')
+if conffile.has_option('config', 'db_ssl'):
+ confset['db_ssl'] = conffile.get('config', 'db_ssl')
# ------- CONNECT TO THE DATABASE.
@@ -152,7 +152,7 @@ try:
db = MySQLdb.connect(db=confset['db_database'], host=confset['db_server'],
user=confset['db_user'], passwd=confset['db_password'],
charset=confset['db_charset'],
- options=confset['db_options'])
+ ssl=confset['db_ssl'])
curs = db.cursor()
except MySQLdb.Error, e:
print '\nUnable to connect to the database.'
@@ -241,10 +241,10 @@ if RANK:
if float(m_rank) > float(MINRANK):
if float(m_votes) > float(MINVOTES):
print "%s: %s: %s" % (m_rank, m_votes, m_title)
-
+
rankfile.close()
-
+
sys.exit(0)
diff --git a/vdbpyrc b/vdbpyrc
index d341da2..a4ae1bf 100644
--- a/vdbpyrc
+++ b/vdbpyrc
@@ -6,4 +6,4 @@ db_password = videodb
db_database = videodb
;db_charset = utf8
db_prefix = videodb_
-;db_options = {'ssl': {'ca':'/path/to/cert.pem',},},
+;db_ssl = {'ca':'/path/to/cert.pem',}