Author: poeml Date: Tue Dec 1 20:07:44 2009 New Revision: 7886 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7886&view=rev Log: mb: catch parse errors in the configuration file, and report them nicely Modified: trunk/mirrordoctor/mb/conf.py Modified: trunk/mirrordoctor/mb/conf.py URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mirrordoctor/mb/conf.py?rev=7886&r1=7885&r2=7886&view=diff ============================================================================== --- trunk/mirrordoctor/mb/conf.py (original) +++ trunk/mirrordoctor/mb/conf.py Tue Dec 1 20:07:44 2009 _at_@ -1,4 +1,5 @@ +import sys import ConfigParser import re _at_@ -22,7 +23,11 @@ self.mirrorprobe = {} cp = ConfigParser.SafeConfigParser() - cp.read(conffile) + try: + cp.read(conffile) + except ConfigParser.ParsingError, e: + print e + sys.exit(2) # # take care of the [general] section _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Tue Dec 01 2009 - 19:07:49 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT