Changeset 2275 for trunk/scripts


Ignore:
Timestamp:
Mar 26, 2009, 1:32:15 AM (15 years ago)
Author:
price
Message:

outage-mail: make subject line an option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/outage/outage-mail

    r2252 r2275  
    2121    msg['Reply-To'] = 'XVM <xvm@mit.edu>'
    2222    msg['From'] = opts.from_addr
    23     msg['Subject'] = '[xvm] Unexpected reboot of your VM %s' % vm
     23    msg['Subject'] = opts.subject % vm
    2424    smtp.sendmail(opts.from_addr,
    2525        [contact, 'xvm@mit.edu'],
     
    3434            dest = 'message',
    3535            help = 'filename with body of message')
     36    parser.add_option('-s', '--subject',
     37            type = 'string',
     38            dest = 'subject',
     39            default = '[xvm] Unexpected reboot of your VM %s',
     40            help = 'subject line of message; %s for VM name')
    3641    parser.add_option('-f', '--from',
    3742            type = 'string',
Note: See TracChangeset for help on using the changeset viewer.