Avoid TestClient error on missing '__mro__' attr
The TestClient unit test fails with: AttributeError: class Zeros has no attribute '__mro__' on Python 2.6 running on Ubuntu Lucid. Resolve by defining Zeros as a new-style class. Change-Id: I97f8eaac31d34a68613e9b30a177191a9de281b0
This commit is contained in:
parent
5f31371330
commit
f380c9e574
@ -1837,7 +1837,7 @@ class TestClient(base.IsolatedUnitTest):
|
|||||||
'properties': {'distro': 'Ubuntu 10.04 LTS'},
|
'properties': {'distro': 'Ubuntu 10.04 LTS'},
|
||||||
}
|
}
|
||||||
|
|
||||||
class Zeros:
|
class Zeros(object):
|
||||||
def __init__(self, chunks):
|
def __init__(self, chunks):
|
||||||
self.chunks = chunks
|
self.chunks = chunks
|
||||||
self.zeros = open('/dev/zero', 'rb')
|
self.zeros = open('/dev/zero', 'rb')
|
||||||
|
Loading…
Reference in New Issue
Block a user