Fix minor flake8 issues
This commit is contained in:
parent
7807016862
commit
501e35dabd
@ -31,8 +31,8 @@ def yum_install(packages):
|
|||||||
try:
|
try:
|
||||||
run_command(cmd)
|
run_command(cmd)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
print ("Failed to install packages %s via Yum: returncode %d" %
|
print("Failed to install packages %s via Yum: returncode %d" %
|
||||||
(", ".join(packages), e.returncode))
|
(", ".join(packages), e.returncode))
|
||||||
sys.exit(e.returncode)
|
sys.exit(e.returncode)
|
||||||
|
|
||||||
|
|
||||||
@ -60,14 +60,14 @@ def read_yaml_file(path):
|
|||||||
try:
|
try:
|
||||||
content = read_file(path)
|
content = read_file(path)
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
print ("Failed to open config dump file %s: %s" %
|
print("Failed to open config dump file %s: %s" %
|
||||||
(path, repr(e)))
|
(path, repr(e)))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
try:
|
try:
|
||||||
return yaml.load(content)
|
return yaml.load(content)
|
||||||
except yaml.YAMLError as e:
|
except yaml.YAMLError as e:
|
||||||
print ("Failed to decode config dump YAML file %s: %s" %
|
print("Failed to decode config dump YAML file %s: %s" %
|
||||||
(path, repr(e)))
|
(path, repr(e)))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user