Pylint/pep8 adjustments.

This commit is contained in:
Joshua Harlow
2012-01-28 21:10:51 -08:00
parent 8fd53948df
commit b5bbc98249
7 changed files with 11 additions and 9 deletions

View File

@@ -58,6 +58,7 @@ class ComponentBase(object):
return list()
return list(deps)
class PkgInstallComponent(ComponentBase):
def __init__(self, component_name, *args, **kargs):
ComponentBase.__init__(self, component_name, *args, **kargs)

View File

@@ -18,6 +18,7 @@ from devstack import component as comp
from devstack import log as logging
from devstack import settings
from devstack import shell as sh
from devstack import utils
from devstack.components import nova

View File

@@ -52,6 +52,7 @@ _WELCOME_MAP = {
# For actions in this list we will reverse the component order
_REVERSE_ACTIONS = [settings.UNINSTALL, settings.STOP]
def _clean_action(action):
if action is None:
return None

View File

@@ -100,6 +100,7 @@ ACTION_CLASSES = {
_FAKE_ROOT_DIR = tempfile.gettempdir()
def get_default_components():
#this seems to be the default list of what to install by default
#ENABLED_SERVICES=${ENABLED_SERVICES:-g-api,g-reg,key,n-api,

View File

@@ -112,6 +112,3 @@ KNOWN_DISTROS = {
UBUNTU11: re.compile(r'Ubuntu(.*)oneiric', re.IGNORECASE),
RHEL6: re.compile(r'redhat-6\.2', re.IGNORECASE),
}

View File

@@ -193,7 +193,7 @@ def get_components_order(components):
#now we have to do a quick check to ensure no component is causing a cycle
for (root, deps) in all_components.items():
#DFS down through the "roots" deps and there deps and so on and
#ensure that nobody is referencing the "root" component name,
#ensure that nobody is referencing the "root" component name,
#that would mean there is a cycle if a dependency of the "root" is.
active_deps = list(deps)
checked_deps = dict()

11
stack
View File

@@ -28,10 +28,10 @@ import traceback
from termcolor import colored
#this needs to happen immediately (or thats what it seems)
logfn = os.getenv('LOG_FILE')
if(logfn == None):
logfn = os.path.join("conf", 'logging.ini')
logging.config.fileConfig(logfn)
log_fn = os.getenv('LOG_FILE')
if(log_fn == None):
log_fn = os.path.join("conf", 'logging.ini')
logging.config.fileConfig(log_fn)
#this handles our option parsing
from devstack import opts
@@ -42,6 +42,7 @@ from devstack.progs import actions
from devstack.progs import describe
from devstack.progs import deps
def main():
#parse and get it done!
args = opts.parse()
@@ -63,7 +64,7 @@ def main():
else:
utils.goodbye(True)
return 0
except:
except Exception:
utils.goodbye(False)
traceback.print_exc(file=sys.stdout)
return 1