compatible with python2 and python3 (#1145)
* compatible with python2 and python3. * fix python version check in configure of qemu. * allow python-2.4. * add credit.
This commit is contained in:

committed by
Nguyen Anh Quynh

parent
c46e745338
commit
f4cc35a24a
@ -20,7 +20,12 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from UserDict import DictMixin
|
||||
try:
|
||||
from UserDict import UserDict
|
||||
from UserDict import DictMixin
|
||||
except ImportError:
|
||||
from collections import UserDict
|
||||
from collections import MutableMapping as DictMixin
|
||||
|
||||
class OrderedDict(dict, DictMixin):
|
||||
|
||||
@ -94,9 +99,6 @@ class OrderedDict(dict, DictMixin):
|
||||
pop = DictMixin.pop
|
||||
values = DictMixin.values
|
||||
items = DictMixin.items
|
||||
iterkeys = DictMixin.iterkeys
|
||||
itervalues = DictMixin.itervalues
|
||||
iteritems = DictMixin.iteritems
|
||||
|
||||
def __repr__(self):
|
||||
if not self:
|
||||
|
Reference in New Issue
Block a user