pep8/pylint fixes
tools/run-pep8 wasn't checking all python files. tools/run-pylint wasnt checking bin/cloud-init fixed resultant pep8 issues after finding them.
This commit is contained in:
parent
66bf6d5459
commit
b9fa90b977
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (C) 2014 Harm Weites
|
||||
#
|
||||
# Author: Harm Weites <harm@weites.com>
|
||||
# Author: Harm Weites <harm@weites.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 3, as
|
||||
|
@ -51,7 +51,7 @@
|
||||
#
|
||||
# auto lo
|
||||
# iface lo inet loopback
|
||||
#
|
||||
#
|
||||
# auto eth0
|
||||
# iface eth0 inet static
|
||||
# address 10.0.0.1
|
||||
@ -64,17 +64,17 @@
|
||||
# {
|
||||
# "lo": {
|
||||
# "auto": true
|
||||
# },
|
||||
# },
|
||||
# "eth0": {
|
||||
# "auto": true,
|
||||
# "auto": true,
|
||||
# "dns-nameservers": [
|
||||
# "98.0.0.1",
|
||||
# "98.0.0.1",
|
||||
# "98.0.0.2"
|
||||
# ],
|
||||
# "broadcast": "10.0.0.255",
|
||||
# "netmask": "255.255.252.0",
|
||||
# "bootproto": "static",
|
||||
# "address": "10.0.0.1",
|
||||
# ],
|
||||
# "broadcast": "10.0.0.255",
|
||||
# "netmask": "255.255.252.0",
|
||||
# "bootproto": "static",
|
||||
# "address": "10.0.0.1",
|
||||
# "gateway": "10.0.0.2"
|
||||
# }
|
||||
# }
|
||||
|
@ -1,4 +1,5 @@
|
||||
import sys, os
|
||||
import os
|
||||
import sys
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
|
6
setup.py
6
setup.py
@ -63,7 +63,7 @@ def tiny_p(cmd, capture=True):
|
||||
(out, err) = sp.communicate()
|
||||
ret = sp.returncode # pylint: disable=E1101
|
||||
if ret not in [0]:
|
||||
raise RuntimeError("Failed running %s [rc=%s] (%s, %s)"
|
||||
raise RuntimeError("Failed running %s [rc=%s] (%s, %s)"
|
||||
% (cmd, ret, out, err))
|
||||
return (out, err)
|
||||
|
||||
@ -102,7 +102,7 @@ class InitsysInstallData(install):
|
||||
" specifying a init system!") % (", ".join(INITSYS_TYPES)))
|
||||
elif self.init_system:
|
||||
self.distribution.data_files.append(
|
||||
(INITSYS_ROOTS[self.init_system],
|
||||
(INITSYS_ROOTS[self.init_system],
|
||||
INITSYS_FILES[self.init_system]))
|
||||
# Force that command to reinitalize (with new file list)
|
||||
self.distribution.reinitialize_command('install_data', True)
|
||||
@ -134,7 +134,7 @@ setuptools.setup(name='cloud-init',
|
||||
[f for f in glob('doc/examples/seed/*') if is_f(f)]),
|
||||
],
|
||||
install_requires=read_requires(),
|
||||
cmdclass = {
|
||||
cmdclass={
|
||||
# Use a subclass for install that handles
|
||||
# adding on the right init system configuration files
|
||||
'install': InitsysInstallData,
|
||||
|
@ -1,15 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
ci_files='cloudinit/*.py cloudinit/config/*.py'
|
||||
test_files=$(find tests -name "*.py")
|
||||
def_files="$ci_files $test_files"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
files=( )
|
||||
for f in $def_files; do
|
||||
[ -f "$f" ] || { echo "failed, $f not a file" 1>&2; exit 1; }
|
||||
files[${#files[@]}]=${f}
|
||||
done
|
||||
files=( bin/cloud-init $(find * -name "*.py" -type f) )
|
||||
else
|
||||
files=( "$@" );
|
||||
fi
|
||||
@ -44,4 +36,3 @@ cmd=(
|
||||
echo -e "\nRunning 'cloudinit' pep8:"
|
||||
echo "${cmd[@]}"
|
||||
"${cmd[@]}"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
files=( $(find * -name "*.py" -type f) )
|
||||
files=( bin/cloud-init $(find * -name "*.py" -type f) )
|
||||
else
|
||||
files=( "$@" );
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user