Merge "Replace six.iteritems() with .items()"
This commit is contained in:
commit
43c6363411
|
@ -18,7 +18,6 @@ limitations under the License.
|
|||
import uuid
|
||||
|
||||
import falcon
|
||||
import six
|
||||
|
||||
from freezer_api.api.common import resource
|
||||
from freezer_api.common import exceptions as freezer_api_exc
|
||||
|
@ -175,7 +174,7 @@ class JobsEvent(resource.BaseResource):
|
|||
doc = self.json_body(req)
|
||||
|
||||
try:
|
||||
event, params = next(six.iteritems(doc))
|
||||
event, params = next(doc.items())
|
||||
except Exception:
|
||||
raise freezer_api_exc.BadDataFormat("Bad event request format")
|
||||
|
||||
|
@ -303,7 +302,7 @@ class Job(object):
|
|||
def expand_default_properties(self):
|
||||
action_defaults = self.doc.pop("action_defaults")
|
||||
if isinstance(action_defaults, dict):
|
||||
for key, val in six.iteritems(action_defaults):
|
||||
for key, val in action_defaults.items():
|
||||
for action in self.doc.get("job_actions"):
|
||||
if action["freezer_action"].get(key) is None:
|
||||
action["freezer_action"][key] = val
|
||||
|
|
|
@ -18,7 +18,6 @@ limitations under the License.
|
|||
import time
|
||||
|
||||
import falcon
|
||||
import six
|
||||
|
||||
from freezer_api.api.common import resource
|
||||
from freezer_api.common import exceptions as freezer_api_exc
|
||||
|
@ -131,7 +130,7 @@ class SessionsAction(resource.BaseResource):
|
|||
doc = self.json_body(req)
|
||||
|
||||
try:
|
||||
action, params = next(six.iteritems(doc))
|
||||
action, params = next(doc.items())
|
||||
except Exception:
|
||||
raise freezer_api_exc.BadDataFormat("Bad action request format")
|
||||
|
||||
|
|
Loading…
Reference in New Issue