Here is a (rather noisy) patch that lets the file compile. 1) Replaced leading pairs of tabs with eight spaces to produce correct indentation. 2) Appended ':' at line 371 to produce well-formed if statement.
--- reportbug/usr/share/reportbug/reportbug_submit.py 2006-06-05 22:59:23.000000000 +1000 +++ /usr/share/reportbug/reportbug_submit.py 2006-06-06 14:15:00.000000000 +1000 @@ -350,34 +350,34 @@ toaddrs = [x[1] for x in alist] smtp_message = re.sub(r'(?m)^[.]', '..', message) - # Modified by AP 2006-03-29 - while failed != True: - ewrite("Connecting to %s via SMTP...\n", smtphost) - try: - conn = smtplib.SMTP(smtphost) - if smtptls: - conn.starttls() - if smtpuser: - if not smtppasswd: - smtppasswd = ui.get_password( - 'Enter SMTP password for [EMAIL PROTECTED]: ' % - (smtpuser, smtphost)) - conn.login(smtpuser, smtppasswd) - conn.sendmail(fromaddr, toaddrs, smtp_message) - conn.quit() - except (socket.error, smtplib.SMTPException), x: - - # If wrong password, try again... - if smtplib.SMTPResponseException.smtp_code == '535' - ewrite('SMTP error: authentication failed. Try again.') - continue - - failed = True - ewrite('SMTP send failure: %s\n', x) - fh, msgname = TempFile(prefix=tfprefix) - fh.write(message) - fh.close() - ewrite('Wrote bug report to %s\n', msgname) + # Modified by AP 2006-03-29 + while failed != True: + ewrite("Connecting to %s via SMTP...\n", smtphost) + try: + conn = smtplib.SMTP(smtphost) + if smtptls: + conn.starttls() + if smtpuser: + if not smtppasswd: + smtppasswd = ui.get_password( + 'Enter SMTP password for [EMAIL PROTECTED]: ' % + (smtpuser, smtphost)) + conn.login(smtpuser, smtppasswd) + conn.sendmail(fromaddr, toaddrs, smtp_message) + conn.quit() + except (socket.error, smtplib.SMTPException), x: + + # If wrong password, try again... + if smtplib.SMTPResponseException.smtp_code == '535': + ewrite('SMTP error: authentication failed. Try again.') + continue + + failed = True + ewrite('SMTP send failure: %s\n', x) + fh, msgname = TempFile(prefix=tfprefix) + fh.write(message) + fh.close() + ewrite('Wrote bug report to %s\n', msgname) else: try: pipe.write(message) -- Paul Collins Melbourne, Australia Dag vijandelijk luchtschip de huismeester is dood -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]