From 5595c7be05e237e96c3182f9e81bc86093175c99 Mon Sep 17 00:00:00 2001 From: Raphaël Barrois Date: Mon, 20 Feb 2012 01:51:51 +0100 Subject: Add some whitespace between lines. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- dbconf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'dbconf.py') diff --git a/dbconf.py b/dbconf.py index 6400737..81ab0eb 100755 --- a/dbconf.py +++ b/dbconf.py @@ -1,6 +1,7 @@ #!/usr/bin/python import time, random, re, os from sys import argv + try: import MySQLdb except ImportError: @@ -42,17 +43,21 @@ try: isThereMysql = True except NameError: isThereMysql = False + try: if sqlite != None: isThereSqlite = True except NameError: isThereSqlite = False + if isThereMysql == isThereSqlite == False: print "Cannot continue without any database support.\nPlease read README.\n\n" quit() + if config['yubiDB'] == 'mysql' and (config['yubiMySQLHost'] == '' or config['yubiMySQLUser'] == '' or config['yubiMySQLPass'] == '' or config['yubiMySQLName'] == ''): print "Cannot continue without any MySQL configuration.\nPlease read README.\n\n" quit() + try: if config['yubiDB'] == 'sqlite': con = sqlite.connect(os.path.dirname(os.path.realpath(__file__)) + '/yubikeys.sqlite') @@ -246,4 +251,4 @@ else: print '' else: print 'No keys in database\n' - \ No newline at end of file + -- cgit v1.2.3