summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 0d14d5ad..4ac63a07 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -1926,8 +1926,6 @@ class Cmd(cmd.Cmd):
:param statement: the parsed statement from the command line
:return: the resolved macro or None on error
"""
- from itertools import islice
-
if statement.command not in self.macros.keys():
raise KeyError('{} is not a macro'.format(statement.command))
@@ -1960,7 +1958,7 @@ class Cmd(cmd.Cmd):
resolved = parts[0] + replacement + parts[1]
# Append extra arguments and use statement.arg_list since these arguments need their quotes preserved
- for arg in islice(statement.arg_list, macro.minimum_arg_count, None):
+ for arg in statement.arg_list[macro.minimum_arg_count:]:
resolved += ' ' + arg
# Restore any terminator, suffix, redirection, etc.