Skip to content

Commit

Permalink
fix module formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
andbag committed Apr 8, 2019
1 parent a881b5a commit 3d758af
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Products/ZCatalog/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,15 @@ def options(self, value):
if op == 'query':
continue
if op not in options:
raise RuntimeError('index %s: option %r is not valid' % (iid, op))
raise RuntimeError(('index {0!r}: option {1!r}'
' is not valid').format(iid, op))
else:
for field in request.keys():
if field.startswith(iid + '_'):
iid_tmp, op = field.split('_')
if op not in options:
raise RuntimeError('index %s: option %r is not valid' % (iid, op))
raise RuntimeError(('index {0!r}: option {1!r}'
' is not valid').format(iid, op))
self._options = options

@property
Expand All @@ -135,7 +137,8 @@ def operator(self, value):
iid = self.id
value = value.lower()
if value not in self.operators:
raise RuntimeError('index %s: operator %r is not valid' % (iid, value))
raise RuntimeError(('index {0!r}: operator {1!r}'
' is not valid').format(iid, value))
self._operator = value.lower()

def get(self, key, default_v=None):
Expand Down

0 comments on commit 3d758af

Please sign in to comment.