[et-mgmt-tools] Minor koan patch

Mark McLoughlin markmc at redhat.com
Wed Apr 4 10:23:36 UTC 2007


Hi,
	Just something I noticed looking at koan's code ...

	Patch fixes a couple of buglets where an exception is re-raised with
the "errno" module as an arg to the exception constructor rather than
the errno int from the original exception.

	Should just re-raise the current exception using an empty raise
statement.

Cheers,
Mark.

Index: koan/koan/app.py
===================================================================
--- koan.orig/koan/app.py	2007-04-04 10:45:13.000000000 +0100
+++ koan.orig/koan/app.py	2007-04-04 10:45:13.000000000 +0100
@@ -191,7 +191,7 @@ class Koan:
             os.mkdir(path)
         except OSError, (err, msg):
             if err != errno.EEXIST:
-                raise OSError(errno,msg)
+                raise
 
     def rmtree(self,path):
         """
@@ -202,7 +202,7 @@ class Koan:
             shutil.rmtree(path)
         except OSError, (err, msg):
             if err != errno.ENOENT:
-                raise OSError(errno,msg)
+                raise
 
     def copyfile(self,src,dest):
         """





More information about the et-mgmt-tools mailing list