Skip empty parameter. Fixes #599. (#600)

This commit is contained in:
Darko Poljak 2017-11-15 07:30:35 +01:00 committed by GitHub
parent 9e7b1c4c06
commit 0bf6af6d22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,7 +155,9 @@ class CdistType(object):
"parameter", "parameter",
"required")) as fd: "required")) as fd:
for line in fd: for line in fd:
parameters.append(line.strip()) line = line.strip()
if line:
parameters.append(line)
except EnvironmentError: except EnvironmentError:
# error ignored # error ignored
pass pass
@ -173,7 +175,9 @@ class CdistType(object):
"parameter", "parameter",
"required_multiple")) as fd: "required_multiple")) as fd:
for line in fd: for line in fd:
parameters.append(line.strip()) line = line.strip()
if line:
parameters.append(line)
except EnvironmentError: except EnvironmentError:
# error ignored # error ignored
pass pass
@ -191,7 +195,9 @@ class CdistType(object):
"parameter", "parameter",
"optional")) as fd: "optional")) as fd:
for line in fd: for line in fd:
parameters.append(line.strip()) line = line.strip()
if line:
parameters.append(line)
except EnvironmentError: except EnvironmentError:
# error ignored # error ignored
pass pass
@ -209,7 +215,9 @@ class CdistType(object):
"parameter", "parameter",
"optional_multiple")) as fd: "optional_multiple")) as fd:
for line in fd: for line in fd:
parameters.append(line.strip()) line = line.strip()
if line:
parameters.append(line)
except EnvironmentError: except EnvironmentError:
# error ignored # error ignored
pass pass
@ -227,7 +235,9 @@ class CdistType(object):
"parameter", "parameter",
"boolean")) as fd: "boolean")) as fd:
for line in fd: for line in fd:
parameters.append(line.strip()) line = line.strip()
if line:
parameters.append(line)
except EnvironmentError: except EnvironmentError:
# error ignored # error ignored
pass pass