[lorax] Allow _ in isolabel (#1118955)
Vratislav Podzimek
vpodzime at redhat.com
Tue Jul 15 07:47:54 UTC 2014
On Mon, 2014-07-14 at 10:08 -0700, Brian C. Lane wrote:
> ---
> share/live/x86.tmpl | 5 ++++-
> share/x86.tmpl | 5 ++++-
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/share/live/x86.tmpl b/share/live/x86.tmpl
> index eb67bbf..3d5b2c5 100644
> --- a/share/live/x86.tmpl
> +++ b/share/live/x86.tmpl
> @@ -8,7 +8,10 @@ KERNELDIR=PXEBOOTDIR
> LIVEDIR="LiveOS"
>
> ## Don't allow spaces or escape characters in the iso label
> -isolabel = ''.join(ch if ch.isalnum() else '-' for ch in isolabel)
> +def valid_label(ch):
> + return ch.isalnum() or ch == '_'
> +
> +isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
> %>
>
> mkdir ${LIVEDIR}
> diff --git a/share/x86.tmpl b/share/x86.tmpl
> index cdd7477..02117cd 100644
> --- a/share/x86.tmpl
> +++ b/share/x86.tmpl
> @@ -8,7 +8,10 @@ KERNELDIR=PXEBOOTDIR
> LIVEDIR="LiveOS"
>
> ## Don't allow spaces or escape characters in the iso label
> -isolabel = ''.join(ch if ch.isalnum() else '-' for ch in isolabel)
> +def valid_label(ch):
> + return ch.isalnum() or ch == '_'
> +
> +isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel)
> %>
>
> mkdir ${LIVEDIR}
ACK.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list