From 1a0de8a67df8282c42f71014cc871684e8d7c0cf Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Wed, 10 Jul 2013 10:47:58 -0400 Subject: Add python3 support Signed-off-by: Chuck Short --- warlock/core.py | 2 +- warlock/model.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'warlock') diff --git a/warlock/core.py b/warlock/core.py index 349c681..fa996d2 100644 --- a/warlock/core.py +++ b/warlock/core.py @@ -16,7 +16,7 @@ import copy -import model +from . import model def model_factory(schema, base_class=model.Model): diff --git a/warlock/model.py b/warlock/model.py index 9ce1a01..1bc3f76 100644 --- a/warlock/model.py +++ b/warlock/model.py @@ -19,8 +19,9 @@ import warnings import jsonpatch import jsonschema +import six -import exceptions +from . import exceptions class Model(dict): @@ -98,13 +99,13 @@ class Model(dict): dict.update(self, other) def iteritems(self): - return copy.deepcopy(dict(self)).iteritems() + return six.iteritems(copy.deepcopy(dict(self))) def items(self): return copy.deepcopy(dict(self)).items() def itervalues(self): - return copy.deepcopy(dict(self)).itervalues() + return six.itervalues(copy.deepcopy(dict(self))) def values(self): return copy.deepcopy(dict(self)).values() -- cgit v1.2.1