[et-mgmt-tools] Minor koan patch

Michael DeHaan mdehaan at redhat.com
Wed Apr 4 14:45:04 UTC 2007


Mark McLoughlin wrote:
> 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):
>          """
>
>
> _______________________________________________
> et-mgmt-tools mailing list
> et-mgmt-tools at redhat.com
> https://www.redhat.com/mailman/listinfo/et-mgmt-tools
>   

Applied, thanks!




More information about the et-mgmt-tools mailing list