diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-02-20 01:51:51 +0100 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2012-02-20 01:51:51 +0100 |
commit | 5595c7be05e237e96c3182f9e81bc86093175c99 (patch) | |
tree | b55e94f3e511a37e95c07f3b4e2bf7d17beda4b8 /dbconf.py | |
parent | Minor cleanup (import, tabs) (diff) | |
download | yubico-yubiserve-5595c7be05e237e96c3182f9e81bc86093175c99.tar.gz yubico-yubiserve-5595c7be05e237e96c3182f9e81bc86093175c99.tar.bz2 yubico-yubiserve-5595c7be05e237e96c3182f9e81bc86093175c99.zip |
Add some whitespace between lines.
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Diffstat (limited to 'dbconf.py')
-rwxr-xr-x | dbconf.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 + |