[ZCM] [ZC] 259/ 2 Resolve "Installation: walkandscrub.py does not remove all pyc/pyo files "

Collector: Zope Bugs and Patches ... zope-coders@zope.org
Mon, 04 Mar 2002 10:13:42 -0500


Issue #259 Update (Resolve) "Installation: walkandscrub.py does not remove all pyc/pyo files "
 Status Resolved, Zope/bug+solution medium
To followup, visit:
  http://collector.zope.org/Zope/259

==============================================================
= Resolve - Entry #2 by ajung on Mar 4, 2002 10:13 am

 Status: Pending => Resolved

Fixed in 2.5 trunk and HEAD.

Thanks for submitting.

-aj
________________________________________
= Request - Entry #1 by snej on Mar 3, 2002 12:52 pm


Uploaded:  "walkandscrub.py.patsch"
 - http://collector.zope.org/Zope/259/walkandscrub.py.patsch/view
inst/walkandscrub.py does not remove all .pyc-files.
Several subsequent runs are necessary to remove
all these files. This is caused by modifying the
'filelist' sequence during a loop over it.

Demo:

   $ python inst/walkandscrub.py|wc
    161     167   12422
  ~/KDesktop/Splitting/dc/Zope> python inst/walkandscrub.py|wc
     74      80    5505
   $ python inst/walkandscrub.py|wc
     33      39    2331
   $ python inst/walkandscrub.py|wc
     15      21     982
   $ python inst/walkandscrub.py|wc
      5      11     253
   $ python inst/walkandscrub.py|wc
      4      10     178

Fix attached. 
(removes filelist.remove(name) from scrub)

==============================================================