diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2018-11-08 14:21:41 +0530 |
---|---|---|
committer | Valerii Ponomarov <vponomar@redhat.com> | 2018-11-19 08:24:56 +0000 |
commit | 78e32c67ec08c179f600ed0adf82ac0fe519602a (patch) | |
tree | 8eb8b4ec090dab02636bccfa98567c079439e9e0 /cns-libs | |
parent | 22b3321de8cf0e1ec32e1b70c540c8f29b9de344 (diff) |
Make waiter function be py2/3 compatible
The special py2's method for iterators called 'next'
was renamed to '__next__' in py3.
So, add second attr, which is required by py3.
Change-Id: Ie3a1d354614f8bab5c2b8d19363d6936fc56e0b2
Diffstat (limited to 'cns-libs')
-rw-r--r-- | cns-libs/cnslibs/common/waiter.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cns-libs/cnslibs/common/waiter.py b/cns-libs/cnslibs/common/waiter.py index 0a6e72b5..0d0c8c3a 100644 --- a/cns-libs/cnslibs/common/waiter.py +++ b/cns-libs/cnslibs/common/waiter.py @@ -33,3 +33,6 @@ class Waiter(object): time.sleep(self.interval) self._attempt += 1 return self + + # NOTE(vponomar): py3 uses "__next__" method instead of "next" one. + __next__ = next |