Skip to content

Commit

Permalink
Fix simple syntax problems caught by flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
andbag committed Apr 8, 2016
1 parent 7f75a22 commit ddcc211
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/Products/PluginIndexes/common/util.py
Expand Up @@ -41,11 +41,12 @@ class parseIndexRequest:
other parameters depend on the the index
- record-style parameters specify a query for an index as instance of the
Record class. This happens usually when parameters from a web form use
the "record" type e.g. <input type="text" name="path.query:record:string">.
All restrictions of the dictionary-style parameters apply to the record-style
parameters
- record-style parameters specify a query for an index as instance
of the Record class. This happens usually when parameters from a
web form use the "record" type e.g.
<input type="text" name="path.query:record:string">.
All restrictions of the dictionary-style parameters apply to the
record-style parameters
"""

ParserException = IndexRequestParseError
Expand All @@ -60,7 +61,7 @@ def __init__(self, request, iid, options=[]):
"""

self.id = iid
if not request.has_key(iid):
if iid not in request:
self.keys = None
return

Expand All @@ -82,7 +83,8 @@ def __init__(self, request, iid, options=[]):
keys = [keys.strip()]

for op in options:
if op == "query": continue
if op == "query":
continue

if hasattr(record, op):
setattr(self, op, getattr(record, op))
Expand All @@ -94,12 +96,13 @@ def __init__(self, request, iid, options=[]):
if isinstance(query, (tuple, list)):
keys = query
else:
keys = [ query ]
keys = [query]

for op in options:
if op == "query": continue
if op == "query":
continue

if param.has_key(op):
if op in param:
setattr(self, op, param[op])

else:
Expand All @@ -112,7 +115,7 @@ def __init__(self, request, iid, options=[]):

for op in options:
field = iid + "_" + op
if request.has_key(field):
if field in request:
setattr(self, op, request[field])

self.keys = keys
Expand Down

0 comments on commit ddcc211

Please sign in to comment.