Bug#370600: reportbug 3.21 fails to configure (while failed != True: SyntaxError: invalid syntax)

2006-06-05 Thread Harry Sintonen

Package: reportbug
Version: 3.21
Severity: grave

Upgrading reportbug to 3.21 fails with the following error:

Setting up reportbug (3.21) ...
Compiling /usr/share/reportbug/reportbug_submit.py ...
  File /usr/share/reportbug/reportbug_submit.py, line 354
while failed != True:
^
SyntaxError: invalid syntax

dpkg: error processing reportbug (--configure):
 subprocess post-installation script returned error exit status 1


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-pegasos
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)


Version infos:

[EMAIL PROTECTED]:~$ dpkg -s python2.3 | grep ^Version:
Version: 2.3.5-9.1
[EMAIL PROTECTED]:~$ dpkg -s libc6 | grep ^Version:
Version: 2.3.6-13


  Regards,
--
l=2001;main(i){float o,O,_,I,D;for(;O=I=l/571.-1.75,l;)for(putchar(--l%80?
i:10),o=D=l%80*.05-2,i=31;_=O*O,O=2*o*O+I,o=o*o-_+D,o+_+_4+Di++87;);puts
(  Harry 'Piru' Sintonen [EMAIL PROTECTED] http://www.iki.fi/sintonen;);}


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#370600: reportbug 3.21 fails to configure (while failed != True: SyntaxError: invalid syntax)

2006-06-05 Thread Paul Collins
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.0 +1000
+++ /usr/share/reportbug/reportbug_submit.py2006-06-06 14:15:00.0 
+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]