Fix deadlock bug when daemonizing
[mspang/pyceo.git] / ceo / main.py
index 9830e18..07a6c5d 100644 (file)
@@ -2,14 +2,17 @@ import sys, ldap
 from getpass import getpass
 import ceo.urwid.main
 import ceo.console.main
-from ceo import ldapi, members
+from ceo import ldapi, members, library
 
 def start():
     try:
-        if len(sys.argv) >= 2 and sys.argv[1] == '--help':
-          ceo.console.main.help()
-          sys.exit(0)
-
+        print "Reading config file...",
+        #XXX this should really all be done through one big config file
+        members.configure()
+        library.configure() 
+        print "read."
+        
+        print "Connecting to LDAP..."
         members.connect(AuthCallback())
 
         if len(sys.argv) == 1:
@@ -26,7 +29,7 @@ def start():
 class AuthCallback:
     def callback(self, error):
         try:
-            sys.stderr.write("Password: ")
+            print "Password: ",
             return getpass("")
         except KeyboardInterrupt:
             print ""