[mirrorbrain-commits] [opensuse-svn] r7635 - trunk/tools/download-redirector-v2/tools

From: Novell Forge SVN <noreply_at_novell.com>
Date: Sat, 27 Jun 2009 18:03:53 -0600 (MDT)
Author: poeml
Date: 2009-06-27 18:03:51 -0600 (Sat, 27 Jun 2009)
New Revision: 7635

Modified:
   trunk/tools/download-redirector-v2/tools/metalink-hasher.py
Log:
metalink-hasher:
- catch exceptions when recursively removing directories (and keep running)
- bump version (1.2)


Modified: trunk/tools/download-redirector-v2/tools/metalink-hasher.py
===================================================================
--- trunk/tools/download-redirector-v2/tools/metalink-hasher.py	2009-06-27 23:38:03 UTC (rev 7634)
+++ trunk/tools/download-redirector-v2/tools/metalink-hasher.py	2009-06-28 00:03:51 UTC (rev 7635)
@@ -24,7 +24,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 
 
-__version__ = '1.1'
+__version__ = '1.2'
 __author__ = 'Peter Poeml <poeml_at_suse.de>'
 __copyright__ = 'Peter poeml <poeml_at_suse.de>'
 __license__ = 'GPLv2'
@@ -208,7 +208,10 @@
                         if os.path.isdir(i_path):
                             print 'Recursively removing obsolete directory %r' % i_path
                             if not opts.dry_run: 
-                                shutil.rmtree(i_path)
+                                try:
+                                    shutil.rmtree(i_path)
+                                except OSError, e:
+                                    print 'Recursive unlinking failed for %r: %s' % (i_path, e.errno)
                             unlinked_dirs += 1
                         else:
                             print 'Unlinking obsolete %r' % i_path

_______________________________________________
Opensuse-svn mailing list
Opensuse-svn_at_forge.novell.com
http://forge.novell.com/mailman/listinfo/opensuse-svn


_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on 2009-06-28Z00:04:24

This archive was generated by hypermail 2.2.0 : 2009-07-10Z19:18:13 GMT