mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Fixed formatting standards on files I've changed.
Used command `find . -name '*.py' | grep -v minify_json | xargs pep8 --ignore=E101,E221,E241,E501,W191`
This commit is contained in:
parent
338465c2b7
commit
60571f66ad
2 changed files with 5 additions and 3 deletions
|
@ -63,18 +63,21 @@ def load_json(path):
|
||||||
with open(path) as stream:
|
with open(path) as stream:
|
||||||
return json.loads(json_minify(stream.read(), False))
|
return json.loads(json_minify(stream.read(), False))
|
||||||
|
|
||||||
|
|
||||||
def load_yaml(path):
|
def load_yaml(path):
|
||||||
import yaml
|
import yaml
|
||||||
with open(path, 'r') as fobj:
|
with open(path, 'r') as fobj:
|
||||||
return yaml.load(fobj)
|
return yaml.load(fobj)
|
||||||
|
|
||||||
|
|
||||||
def config_get(path, config_path):
|
def config_get(path, config_path):
|
||||||
config = load_json(path)
|
config = load_json(path)
|
||||||
for key in config_path:
|
for key in config_path:
|
||||||
config = config.get(key)
|
config = config.get(key)
|
||||||
return config
|
return config
|
||||||
|
|
||||||
def copy_tree(from_path,to_path):
|
|
||||||
|
def copy_tree(from_path, to_path):
|
||||||
from shutil import copy
|
from shutil import copy
|
||||||
import os
|
import os
|
||||||
for abs_prefix, dirs, files in os.walk(from_path):
|
for abs_prefix, dirs, files in os.walk(from_path):
|
||||||
|
@ -90,4 +93,3 @@ def copy_tree(from_path,to_path):
|
||||||
for path in files:
|
for path in files:
|
||||||
copy(os.path.join(abs_prefix, path),
|
copy(os.path.join(abs_prefix, path),
|
||||||
os.path.join(to_path, prefix, path))
|
os.path.join(to_path, prefix, path))
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -19,7 +19,7 @@ setup(name='bootstrap-vz',
|
||||||
install_requires=['termcolor >= 1.1.0',
|
install_requires=['termcolor >= 1.1.0',
|
||||||
'fysom >= 1.0.15',
|
'fysom >= 1.0.15',
|
||||||
'jsonschema >= 2.3.0',
|
'jsonschema >= 2.3.0',
|
||||||
'pyyaml >= 3.10',
|
'pyyaml >= 3.10',
|
||||||
],
|
],
|
||||||
license='Apache License, Version 2.0',
|
license='Apache License, Version 2.0',
|
||||||
description='Bootstrap Debian images for virtualized environments',
|
description='Bootstrap Debian images for virtualized environments',
|
||||||
|
|
Loading…
Add table
Reference in a new issue