mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-03 01:39:23 +01:00
Added an assert to prevent improper usage by inexperienced developers.
This commit is contained in:
parent
0719b5e6b8
commit
31a5e2b462
@ -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
|
||||
let the caller handle sending the help message.
|
||||
"""
|
||||
assert not isinstance(args, str), 'args should be a list.'
|
||||
if len(args) < required:
|
||||
raise callbacks.ArgumentError
|
||||
if len(args) < required + optional:
|
||||
|
Loading…
Reference in New Issue
Block a user