diff options
author | shuangtai <shuangtai.tian@intel.com> | 2014-06-10 14:27:53 +0800 |
---|---|---|
committer | shuangtai <shuangtai.tian@intel.com> | 2014-06-10 14:33:40 +0800 |
commit | d9d11fc612444e0b64fa1f35bd3f6ec5cc2bc86a (patch) | |
tree | 1ff14fec1f42d6e965dbc513db6d9b4f0a21d046 | |
parent | a0721b4f8525a2097bea448949577d54429af275 (diff) | |
download | stevedore-d9d11fc612444e0b64fa1f35bd3f6ec5cc2bc86a.tar.gz |
use six.add_metaclass
Using six.add_metaclass instead of "__metaclass__" for Python 3.x
compatibility.
Change-Id: I8bf33fb1770511657587c8f7a33acfcf9a351e79
-rw-r--r-- | requirements.txt | 1 | ||||
-rw-r--r-- | stevedore/example/base.py | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/requirements.txt b/requirements.txt index 1352d5e..2a0c119 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ argparse +six>=1.6.0 diff --git a/stevedore/example/base.py b/stevedore/example/base.py index d128a53..1c8ca4c 100644 --- a/stevedore/example/base.py +++ b/stevedore/example/base.py @@ -1,12 +1,13 @@ import abc +import six + +@six.add_metaclass(abc.ABCMeta) class FormatterBase(object): """Base class for example plugin used in the tutoral. """ - __metaclass__ = abc.ABCMeta - def __init__(self, max_width=60): self.max_width = max_width |