diff options
author | Todd Leonhardt <toleonha@microsoft.com> | 2018-09-20 16:18:44 -0400 |
---|---|---|
committer | Todd Leonhardt <toleonha@microsoft.com> | 2018-09-20 16:18:44 -0400 |
commit | e74976ea38f7e7c625071038c5b3c022942643f3 (patch) | |
tree | 97e0af1986fcb5fb82227d3b1c84ccce616060d2 /cmd2/parsing.py | |
parent | 25e388cc78002f78e93b946367b883a4802cfd4e (diff) | |
download | cmd2-git-e74976ea38f7e7c625071038c5b3c022942643f3.tar.gz |
Fix attrs usage so it works with older versions of attrs
Diffstat (limited to 'cmd2/parsing.py')
-rw-r--r-- | cmd2/parsing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/parsing.py b/cmd2/parsing.py index 8edfacb9..92dc1b40 100644 --- a/cmd2/parsing.py +++ b/cmd2/parsing.py @@ -90,7 +90,7 @@ class Statement(str): command = attr.ib(default='', validator=attr.validators.instance_of(str), type=str) # list of arguments to the command, not including any output redirection or terminators; quoted args remain quoted - arg_list = attr.ib(factory=list, validator=attr.validators.instance_of(list), type=List[str]) + arg_list = attr.ib(default=attr.Factory(list), validator=attr.validators.instance_of(list), type=List[str]) # if the command is a multiline command, the name of the command, otherwise empty multiline_command = attr.ib(default='', validator=attr.validators.instance_of(str), type=str) @@ -102,7 +102,7 @@ class Statement(str): suffix = attr.ib(default='', validator=attr.validators.instance_of(str), type=str) # if output was piped to a shell command, the shell command as a list of tokens - pipe_to = attr.ib(factory=list, validator=attr.validators.instance_of(list), type=List[str]) + pipe_to = attr.ib(default=attr.Factory(list), validator=attr.validators.instance_of(list), type=List[str]) # if output was redirected, the redirection token, i.e. '>>' output = attr.ib(default='', validator=attr.validators.instance_of(str), type=str) |