Skip to content

Commit

Permalink
Fixed bom_match() argument validation.
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Baker <[email protected]>
  • Loading branch information
jbaker0428 committed Jun 15, 2012
1 parent 166db73 commit 37ef67c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions octopart.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
limitations under the License.
"""

__version__ = "0.5.3"
__version__ = "0.5.4"
__author__ = "Joe Baker <[email protected]>"
__contributors__ = []

Expand Down Expand Up @@ -1094,7 +1094,7 @@ def _bom_match_args(self, lines, args):
args = self._translate_periods(args)
args['lines'] = lines
# DictType arguments need to be validated just like the normal args dict
lines_required_args = frozenset(('reference',))
lines_required_args = frozenset()
lines_arg_types = {'q': StringType, \
'mpn' : StringType, \
'manufacturer' : StringType, \
Expand All @@ -1104,7 +1104,7 @@ def _bom_match_args(self, lines, args):
'start' : IntType, \
'limit' : IntType, \
'reference' : StringType}
lines_arg_ranges = {'limit' : range(21)}
lines_arg_ranges = {'limit' : (0, 20)}
for line in lines:
self._validate_args(line, lines_arg_types, lines_arg_ranges)
# Method-specific checks not covered by validate_args:
Expand Down

0 comments on commit 37ef67c

Please sign in to comment.