On Mon, 2002-12-02 at 22:54, Jason R. Mastaler wrote:
> Patrick Starrenburg <[EMAIL PROTECTED]> writes:
> > What was doing the munching?
>
> Currently, if there is an error in /etc/tmdarc, the rest of file is
> skipped. Otherwise, an error there would hold up every TMDA user on
> the system until fixed. So, you probably had some important settings
> after the OS.UMASK() that were skipped because of the syntax error.
>
> Perhaps this should be changed to not skip over errors in /etc/tmdarc,
> I dunno.
Or at least log if and where an error occured. Please consider the
following patch, I didn't commit it because I'm not sure about the
'print' statements:
diff -u -r1.162 Defaults.py
--- Defaults.py 2 Dec 2002 22:26:43 -0000 1.162
+++ Defaults.py 2 Dec 2002 22:51:46 -0000
@@ -68,7 +68,12 @@
try:
execfile(GLOBAL_TMDARC)
except:
- pass # just skip it if there is a
problem
+ # just log and skip it if there is a problem
+ tb = sys.exc_info()[2]
+ while tb.tb_next:
+ tb = tb.tb_next
+ print "Error in %s at line %d." % (GLOBAL_TMDARC, tb.tb_lineno)
+ print "Please check the syntax or you may lose messages!"
# Look for the user-config-file in the environment first then default
# to ~/.tmdarc or ~/.tmda/config
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users