Allow _ in isolabel (#1118955)

This commit is contained in:
Brian C. Lane 2014-07-14 09:52:53 -07:00
parent 12226ed90b
commit 54acdd3f4b
2 changed files with 8 additions and 2 deletions

View File

@ -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}

View File

@ -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}