Hello
I attach a patch to implement command line options for smtp servers.
[[[
add command line options to mailer.py
* tools/hook-scripts/mailer/mailer.py
() : import OptionParser.
(main) : add options to arguments.
(PipeOutput.__init__) : call cfg.get_mail_command()
to get mail command.
(Messenger.__init__) : call cfg.get_mail_command() and
cfg.get_smtp_hostname() to get
target.
(Config.__init__) : add options to arguments and save it.
(Config.get_mail_command) : get mail command from command line
or config.
(Config.get_smtp_hostname): get smtp hostname from command line
or config.
(Config.get_smtp_username): get smtp username from command line
or config.
(Config.get_smtp_password): get smtp password from command line
or config.
(setup_option_parser) : create instance of OptionParser.
(usage) : print usage by using OptionParser.
(): parse command line by using OptionParser.
]]]
--
Masaru Tsuchiyama <m.tmatma_at_gmail.com>
Received on 2013-08-15 10:46:54 CEST