Skip to content
Permalink
Browse files

Fix remarks from review

  • Loading branch information...
fredreichbier committed Jul 24, 2019
1 parent 04d223f commit 9c93c15aa1f1c2118cd5bfa60828364001537b7b
Showing with 4 additions and 4 deletions.
  1. +4 −4 privacyidea/lib/utils/compare.py
@@ -61,7 +61,7 @@ def parse_comma_separated_string(input_string):
try:
reader = csv.reader([input_string], strict=True, skipinitialspace=True, doublequote=False, escapechar="\\")
rows = list(reader)
except Exception as exx:
except csv.Error as exx:
raise CompareError(u"Malformed comma-separated value: {!r}".format(input_string, exx))
return rows[0]

@@ -89,7 +89,7 @@ def _compare_contains(left, comparator, right):

def _compare_matches(left, comparator, right):
"""
Return True if ``left`` matches the regular expression given in ``right``.
Return True if the string in ``left`` completely matches the regular expression given in ``right``.
Raise a CompareError if ``right`` is not a valid regular expression, or
if any other matching error occurs.
:param left: a string
@@ -168,8 +168,8 @@ class COMPARATORS(object):
COMPARATORS.EQUALS: _("true if the two values are equal"),
COMPARATORS.NOT_EQUALS: _("false if the two values are equal"),

COMPARATORS.MATCHES: _("true if the left value matches the given regular expression pattern"),
COMPARATORS.NOT_MATCHES: _("false if the left value matches the given regular expression pattern"),
COMPARATORS.MATCHES: _("true if the left value completely matches the given regular expression pattern"),
COMPARATORS.NOT_MATCHES: _("false if the left value completely matches the given regular expression pattern"),

COMPARATORS.IN: _("true if the left value is contained in the comma-separated values on the right"),
COMPARATORS.NOT_IN: _("false if the left value is contained in the comma-separated values on the right")

0 comments on commit 9c93c15

Please sign in to comment.
You can’t perform that action at this time.