Ran 2to3 on pillar + some manual fixups

The 'manual fixups' are:

- incorrect use of dict.items() where dict.iteritems() was meant; this
  results in list(dict.items()), which I changed to dict.items().
- removal of 'from __future__ import' lines, which 2to3 changes into
  empty lines; I removed the empty lines.
This commit is contained in:
2017-03-03 12:00:24 +01:00
parent 10b3318419
commit 663627358f
39 changed files with 254 additions and 265 deletions

View File

@@ -449,7 +449,7 @@ def edit(project_url):
url=project.url,
summary=project.summary,
description=project.description,
is_private=u'GET' not in project.permissions.world,
is_private='GET' not in project.permissions.world,
category=project.category,
status=project.status,
)
@@ -471,7 +471,7 @@ def edit(project_url):
if form.is_private.data:
project.permissions.world = []
else:
project.permissions.world = [u'GET']
project.permissions.world = ['GET']
project.update(api=api)
# Reattach the pictures
@@ -721,7 +721,7 @@ def project_update_nodes_list(node, project_id=None, list_name='latest'):
elif not project_id:
return None
project_id = node.project
if type(project_id) is not unicode:
if type(project_id) is not str:
project_id = node.project._id
api = system_util.pillar_api()
project = Project.find(project_id, api=api)