summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-21 21:56:59 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-21 21:56:59 -0400
commit3f945dcc11dd975a679b660dd6288efdbdb3c018 (patch)
tree55871990936c7449dcba2b62826e5f5d45ae44b9 /cmd2.py
parentc9e4e39f4ffec4f7cb826f674a38fc8903ea651c (diff)
downloadcmd2-git-3f945dcc11dd975a679b660dd6288efdbdb3c018.tar.gz
Fixed Python 2.7 issue
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd2.py b/cmd2.py
index 4139217e..5ac94061 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -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__ = ()