Author: poeml Date: Mon Jun 18 23:59:28 2012 New Revision: 8295 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8295&view=rev Log: mb: - command line option for configuration file path, patch kindly provided by Gökdeniz Karadağ Modified: trunk/mb/mb.py Modified: trunk/mb/mb.py URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mb/mb.py?rev=8295&r1=8294&r2=8295&view=diff ============================================================================== --- trunk/mb/mb.py (original) +++ trunk/mb/mb.py Mon Jun 18 23:59:28 2012 _at_@ -56,6 +56,9 @@ def get_optparser(self): """Parser for global options (that are not specific to a subcommand)""" optparser = cmdln.CmdlnOptionParser(self, version=__version__) + optparser.add_option('-c', '--config', default='/etc/mirrorbrain.conf', + help='location of configuration file ' + '(default: /etc/mirrorbrain.conf)') optparser.add_option('-d', '--debug', action='store_true', help='print info useful for debugging') optparser.add_option('-b', '--brain-instance', _at_@ -72,7 +75,7 @@ import os, mb.conf if not self.options.brain_instance: self.options.brain_instance = os.getenv('MB', default=None) - self.config = mb.conf.Config(instance = self.options.brain_instance) + self.config = mb.conf.Config(conffile = self.options.config, instance = self.options.brain_instance) # set up the database connection import mb.conn _______________________________________________ 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 Mon Jun 18 2012 - 21:59:29 GMT
This archive was generated by hypermail 2.3.0 : Mon Jun 18 2012 - 22:17:03 GMT