]> git.llucax.com Git - software/pymin.git/commitdiff
Use logging module to report errors in pymind.
authorLeandro Lucarella <llucax@gmail.com>
Mon, 16 Jun 2008 21:39:36 +0000 (18:39 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Mon, 16 Jun 2008 21:39:36 +0000 (18:39 -0300)
pymind

diff --git a/pymind b/pymind
index d40c80f3d19dfd7ca3dca3edd6e68688555749ff..488b34eafc366559da36cbefdc7198d300044de3 100755 (executable)
--- a/pymind
+++ b/pymind
@@ -2,6 +2,8 @@
 # vim: set encoding=utf-8 et sw=4 sts=4 :
 
 import sys
+import logging ; log = logging.getLogger('pymind')
+
 from pymin.pymindaemon import PyminDaemon
 from pymin.dispatcher import Handler
 from pymin.service import load_service, LoadError
@@ -20,7 +22,7 @@ def build_root(config):
         try:
             s = load_service(service, config.services_dirs)
         except LoadError, e:
-            sys.stderr.write("Can't find service called '%s'\n" % service)
+            log.error("Can't find service called '%s'\n", service)
             sys.exit(EXIT_NO_SERVICE)
         services[service] = s
     root = Root()