[ mailman-Bugs-1444447 ] show_qfiles: 'str' object has no attribute 'as_string'

SourceForge.net noreply at sourceforge.net
Fri Mar 10 20:09:33 CET 2006


Bugs item #1444447, was opened at 2006-03-06 13:43
Message generated for change (Comment added) made by msapiro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1444447&group_id=103

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: command line scripts
Group: 2.1 (stable)
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Axel Beckert (xtaran)
Assigned to: Nobody/Anonymous (nobody)
Summary: show_qfiles: 'str' object has no attribute 'as_string'

Initial Comment:
With mailman 2.1.5 and Python 2.4 on SuSE Linux 9.3,
show_qfiles throws an error:

python show_qfiles-2.1.7.orig ~/xchange/test.pck
====================> /home/abe/xchange/test.pck
Traceback (most recent call last):
  File "show_qfiles-2.1.7.orig", line 74, in ?
    main()
  File "show_qfiles-2.1.7.orig", line 67, in main
    sys.stdout.write(msg.as_string())
AttributeError: 'str' object has no attribute 'as_string'

Removing the ".as_string()" from the source of
show_qfiles fixes the problem.

show_qfiles is still the same in 2.1.7 and still throws
this error. Tested with 2.1.7 and Python 2.4.1 under
SuSE Linux 10.0.

Patch:

--- show_qfiles-2.1.7.orig      2006-03-06
22:38:46.000000000 +0100
+++ show_qfiles-2.1.7   2006-03-06 22:40:27.000000000 +0100
@@ -64,7 +64,7 @@
         fp = open(filename)
         if filename.endswith(".pck"):
             msg = load(fp)
-            sys.stdout.write(msg.as_string())
+            sys.stdout.write(msg)
         else:
             sys.stdout.write(fp.read())
 


----------------------------------------------------------------------

>Comment By: Mark Sapiro (msapiro)
Date: 2006-03-10 11:09

Message:
Logged In: YES 
user_id=1123998

Patch included in 2.1.8a1.

----------------------------------------------------------------------

Comment By: Mark Sapiro (msapiro)
Date: 2006-03-06 15:20

Message:
Logged In: YES 
user_id=1123998

Your patch will fix the show_qfiles for those entries in the
'in' queue that have unparsed message text, but it will
break it for all other entries that have a
Mailman.Message.Message instance.

Try the attached patch and see if it isn't better. Please
report back on what does and doesn't work for you.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1444447&group_id=103


More information about the Mailman-coders mailing list