CLOUDSTACK-5449: fixed pep8 errors

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
SrikanteswaraRao Talluri 2013-12-12 17:06:31 +05:30
parent ca1e10398d
commit 8374ff591d
2 changed files with 19 additions and 10 deletions

View File

@ -118,7 +118,8 @@ class MarvinInit:
log_config = self.__parsedConfig.logger
if log_config is not None:
if log_config.LogFolderPath is not None:
self.logFolderPath = log_config.LogFolderPath + '/' + temp_path
self.logFolderPath = log_config.LogFolderPath + '/' \
+ temp_path
else:
self.logFolderPath = temp_path
else:
@ -126,8 +127,9 @@ class MarvinInit:
else:
self.logFolderPath = self.__logFolderPath + '/' + temp_path
if os.path.exists(self.logFolderPath):
self.logFolderPath = self.logFolderPath \
+ ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(3))
self.logFolderPath += ''.join(random.choice(
string.ascii_uppercase +
string.digits for x in range(3)))
os.makedirs(self.logFolderPath)
'''
Log File Paths

View File

@ -80,17 +80,22 @@ class MarvinPlugin(Plugin):
Register command line options
"""
parser.add_option("--marvin-config", action="store",
default=env.get('MARVIN_CONFIG', './datacenter.cfg'),
default=env.get('MARVIN_CONFIG',
'./datacenter.cfg'),
dest="config_file",
help="Marvin's configuration file where the " +
"datacenter information is specified " +
"[MARVIN_CONFIG]")
parser.add_option("--load", action="store_true", default=False,
"datacenter information is specified" +
" [MARVIN_CONFIG]")
parser.add_option("--load", action="store_true",
default=False,
dest="load",
help="Only load the deployment configuration given")
parser.add_option("--log-folder-path", action="store", default=None,
parser.add_option("--log-folder-path",
action="store",
default=None,
dest="log_folder_path",
help="Path to the folder where log files will be stored")
help="Path to the folder "
"where log files will be stored")
Plugin.options(self, parser, env)
def wantClass(self, cls):
@ -169,7 +174,9 @@ class MarvinPlugin(Plugin):
Creates a debugstream for tc debug log
'''
try:
obj_marvininit = MarvinInit(self.configFile, self.loadFlag, self.logFolderPath)
obj_marvininit = MarvinInit(self.configFile,
self.loadFlag,
self.logFolderPath)
if obj_marvininit.init() == SUCCESS:
self.testClient = obj_marvininit.getTestClient()
self.tcRunLogger = obj_marvininit.getLogger()