Minor refactoring

This commit is contained in:
Miroslav Stampar 2012-07-14 11:01:30 +02:00
parent 3f4186ce2c
commit 805120ac52
4 changed files with 5 additions and 5 deletions

View File

@ -399,7 +399,7 @@ def start():
if skip: if skip:
continue continue
if not conf.paramDict.has_key(place): if place not in conf.paramDict:
continue continue
paramDict = conf.paramDict[place] paramDict = conf.paramDict[place]

View File

@ -62,7 +62,7 @@ def __setRequestParams():
testableParameters = False testableParameters = False
# Perform checks on GET parameters # Perform checks on GET parameters
if conf.parameters.has_key(PLACE.GET) and conf.parameters[PLACE.GET]: if conf.parameters.get(PLACE.GET):
parameters = conf.parameters[PLACE.GET] parameters = conf.parameters[PLACE.GET]
paramDict = paramToDict(PLACE.GET, parameters) paramDict = paramToDict(PLACE.GET, parameters)

View File

@ -236,7 +236,7 @@ class Connect:
pass pass
elif target: elif target:
if conf.parameters.has_key(PLACE.GET) and not get: if PLACE.GET in conf.parameters and not get:
get = conf.parameters[PLACE.GET] get = conf.parameters[PLACE.GET]
if get: if get:
@ -245,7 +245,7 @@ class Connect:
if conf.method == HTTPMETHOD.POST and not post: if conf.method == HTTPMETHOD.POST and not post:
for place in (PLACE.POST, PLACE.SOAP): for place in (PLACE.POST, PLACE.SOAP):
if conf.parameters.has_key(place): if place in conf.parameters:
post = conf.parameters[place] post = conf.parameters[place]
break break

View File

@ -123,7 +123,7 @@ def tableExists(tableFile, regex=None):
logger.warn(warnMsg) logger.warn(warnMsg)
else: else:
for item in threadData.shared.outputs: for item in threadData.shared.outputs:
if not kb.data.cachedTables.has_key(conf.db): if conf.db not in kb.data.cachedTables:
kb.data.cachedTables[conf.db] = [item] kb.data.cachedTables[conf.db] = [item]
else: else:
kb.data.cachedTables[conf.db].append(item) kb.data.cachedTables[conf.db].append(item)