Added an assert to prevent improper usage by inexperienced developers.

This commit is contained in:
Jeremy Fincher 2003-12-08 01:10:27 +00:00
parent 0719b5e6b8
commit 31a5e2b462

View File

@ -71,6 +71,7 @@ def getArgs(args, required=1, optional=0):
If there aren't enough args even to satisfy required, raise an error and If there aren't enough args even to satisfy required, raise an error and
let the caller handle sending the help message. let the caller handle sending the help message.
""" """
assert not isinstance(args, str), 'args should be a list.'
if len(args) < required: if len(args) < required:
raise callbacks.ArgumentError raise callbacks.ArgumentError
if len(args) < required + optional: if len(args) < required + optional: