commit a565bdf38a08011c90dacb59c971dc69ebf816a4
Author: Yi Yang <[email protected]>
Date:   Mon Nov 8 16:20:23 2010 +0800

    Fix urllib2 compatibility issue
    
    Note: different urllib2 has different exception type for the same
    error, so need to handle them specially.

diff --git a/mic/imgcreate/yuminst.py b/mic/imgcreate/yuminst.py
index fea0917..8c41b52 100644
--- a/mic/imgcreate/yuminst.py
+++ b/mic/imgcreate/yuminst.py
@@ -151,8 +151,11 @@ class LiveCDYum(yum.YumBase):
                 return None
             else:
                 raise CreatorError(oserr)
-        except IOError, err:
-            raise CreatorError(err)
+        except IOError, oserr:
+            if hasattr(oserr, "reason") and oserr.reason.errno == 2:
+                return None
+            else:
+                raise CreatorError(oserr)
         except u2.URLError, err:
             raise CreatorError(err)
 
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev

Reply via email to