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

From: Novell Forge SVN <noreply_at_novell.com>
Date: Sun, 28 Jun 2009 09:14:32 -0600 (MDT)
Author: poeml
Date: 2009-06-28 09:14:28 -0600 (Sun, 28 Jun 2009)
New Revision: 7640

Modified:
   trunk/tools/download-redirector-v2/tools/metalink-hasher.py
Log:
metalink-hasher:
- Avoid erroring out when directories on the todo list vanished.


Modified: trunk/tools/download-redirector-v2/tools/metalink-hasher.py
===================================================================
--- trunk/tools/download-redirector-v2/tools/metalink-hasher.py	2009-06-28 12:12:21 UTC (rev 7639)
+++ trunk/tools/download-redirector-v2/tools/metalink-hasher.py	2009-06-28 15:14:28 UTC (rev 7640)
@@ -166,7 +166,12 @@
         while len(directories_todo) > 0:
             src_dir = directories_todo.pop(0)
 
-            src_dir_mode = os.stat(src_dir).st_mode
+            try:
+                src_dir_mode = os.stat(src_dir).st_mode
+            except OSError, e:
+                if e.errno == errno.ENOENT:
+                    sys.stderr.write('Directory vanished: %r' % src)
+                    continue
 
             dst_dir = os.path.join(opts.target_dir, src_dir[len(opts.base_dir):].lstrip('/'))
 

_______________________________________________
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-28Z15:14:55

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