diff --git a/seafile-ldap.py b/seafile-ldap.py index a1facde..f1bc996 100644 --- a/seafile-ldap.py +++ b/seafile-ldap.py @@ -106,18 +106,6 @@ dbName = ccnetConfig['Database']['DB'] dbCharset = ccnetConfig['Database']['CONNECTION_CHARSET'] logger.debug("DB Engine: {0}, DB Host: {1}, DB Port: {2}, DB User: {3}, DB Name: {4}, DB Connection Charset: {5}".format(dbEngine, dbHost, dbPort, dbUser, dbName, dbCharset)) -# Config DB Varaibles -dbconfig = { - 'user': dbUser, - 'password': dbPassword, - 'host': dbHost, - 'port': dbPort, - 'database': dbName, - 'charset': dbCharset, - 'raise_on_warnings': True -} - - # ldap Config ldapHost = ccnetConfig['LDAP']['HOST'] #ldapPort = ccnetConfig['LDAP SERVER'].getint('port') @@ -130,6 +118,17 @@ logger.debug("LDAP Host: {0}, LDAP Base: {1}, LDAP User DN: {2}, LDAP Filter: {3 logger.debug("Finished reading the ccnet.conf file.") +# Config DB Varaibles +dbconfig = { + 'user': dbUser, + 'password': dbPassword, + 'host': dbHost, + 'port': dbPort, + 'database': dbName, + 'charset': dbCharset, + 'raise_on_warnings': True +} + # setup the server ldapServer = Server(ldapHost) logger.debug("Setup LDAP server connection uri: {0}".format(ldapServer))