diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-21 21:56:59 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-21 21:56:59 -0400 |
commit | 3f945dcc11dd975a679b660dd6288efdbdb3c018 (patch) | |
tree | 55871990936c7449dcba2b62826e5f5d45ae44b9 /cmd2.py | |
parent | c9e4e39f4ffec4f7cb826f674a38fc8903ea651c (diff) | |
download | cmd2-git-3f945dcc11dd975a679b660dd6288efdbdb3c018.tar.gz |
Fixed Python 2.7 issue
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -54,10 +54,14 @@ import pyperclip try: from collections.abc import Collection except ImportError: - import collections.abc as abc + + if six.PY3: + from collections.abc import Sized, Iterable, Container + else: + from collections import Sized, Iterable, Container # noinspection PyAbstractClass - class Collection(abc.Sized, abc.Iterable, abc.Container): + class Collection(Sized, Iterable, Container): __slots__ = () |