[Thuban-commits] r2813 - trunk/thuban/Thuban/UI

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Jan 19 02:18:43 CET 2008


Author: bernhard
Date: 2008-01-19 02:18:42 +0100 (Sat, 19 Jan 2008)
New Revision: 2813

Modified:
   trunk/thuban/Thuban/UI/application.py
Log:
* Thuban/UI/application.py: Started using the logging module for
error message and runtime information.
(read_startup_files): Trying to read new site wide startup file
Thuban/thuban_cfg.py.


Modified: trunk/thuban/Thuban/UI/application.py
===================================================================
--- trunk/thuban/Thuban/UI/application.py	2008-01-19 01:15:56 UTC (rev 2812)
+++ trunk/thuban/Thuban/UI/application.py	2008-01-19 01:18:42 UTC (rev 2813)
@@ -17,6 +17,8 @@
 
 import traceback
 
+import logging
+
 import wx
 
 from Thuban.Lib.connector import Publisher
@@ -95,7 +97,14 @@
 
     def read_startup_files(self):
         """Read the startup files."""
-        # for now the startup file is ~/.thuban/thubanstart.py
+
+        logging.info("Reading thuban_cfg.py file.")
+        try:
+            import Thuban.thuban_cfg
+        except:
+            logging.exception(_("Cannot import the thuban_cfg module."))
+
+        logging.info(_("Trying to read ~/.thuban/thubanstart.py."))
         dir = get_application_dir()
         if os.path.isdir(dir):
             sys.path.append(dir)



More information about the Thuban-commits mailing list