Revision: 5186
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5186&view=rev
Author:   jdh2358
Date:     2008-05-17 15:05:52 -0700 (Sat, 17 May 2008)

Log Message:
-----------
fixed backend driver cleanup

Modified Paths:
--------------
    trunk/matplotlib/examples/tests/backend_driver.py

Modified: trunk/matplotlib/examples/tests/backend_driver.py
===================================================================
--- trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 21:57:19 UTC 
(rev 5185)
+++ trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 22:05:52 UTC 
(rev 5186)
@@ -209,12 +209,14 @@
         localdirs = [d for d in glob.glob('*') if os.path.isdir(d)]
         all_backends_set = set(all_backends)
         for d in localdirs:
-            if d.lower() in all_backends_set:
-                command = 'rm -rf %s'%d
-                # todo: implement python recursive remove
-                print 'executing: %s'%command
-                os.system(command)
-        os.system('rm -rf _tmp*.py')
+            if d.lower() not in all_backends_set: continue
+            print 'removing %s'%d
+            for fname in glob.glob(os.path.join(d, '*')):
+                os.remove(fname)
+            os.rmdir(d)
+        for fname in glob.glob('_tmp*.py'):
+            os.remove(fname)
+
         print 'all clean...'
         raise SystemExit
     if '--coverage' in sys.argv:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to