James Laska wrote:
> ---
>  cobbler/pxegen.py |   22 ++++++++++++++++++++--
>  1 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/cobbler/pxegen.py b/cobbler/pxegen.py
> index 4ea9dee..6d9f864 100644
> --- a/cobbler/pxegen.py
> +++ b/cobbler/pxegen.py
> @@ -108,15 +108,33 @@ class PXEGen:
>          NOTE:  this has to be done for both tftp and http methods
>          """
>          # copy is a 4-letter word but tftpboot runs chroot, thus it's 
> required.
> +        errors = list()
>          for d in self.distros:
> -            self.copy_single_distro_files(d)
> +            try:
> +                self.copy_single_distro_files(d)
> +            except CX, e:
> +                errors.append(e)
> +                print e.value
> +
> +        # FIXME: using logging module so this ends up in cobbler.log?
> +        if len(errors) > 0:
> +            raise CX(_("Error(s) encountered while copying distro files"))
>  
>      def copy_images(self):
>          """
>          Like copy_distros except for images.
>          """
> +        errors = list()
>          for i in self.images:
> -            self.copy_single_image_files(i)
> +            try:
> +                self.copy_single_image_files(i)
> +            except CX, e:
> +                errors.append(e)
> +                print e.value
> +
> +        # FIXME: using logging module so this ends up in cobbler.log?
> +        if len(errors) > 0:
> +            raise CX(_("Error(s) encountered while copying image files"))
>  
>      def copy_single_distro_files(self, d):
>          for dirtree in [self.bootloc, self.settings.webdir]: 
>   

Applied, thanks!


_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to