~ost-maintainers/mojo/py3

« back to all changes in this revision

Viewing changes to mojo/cli.py

  • Committer: Chris MacNaughton
  • Date: 2018-01-19 07:08:26 UTC
  • mfrom: (462.1.4 mojo3)
  • Revision ID: chris.macnaughton@canonical.com-20180119070826-qg4finno09l6kh16
[chris.macnaughton, r=1chb1n]  Updating functions to py3

This MP covers:

- items -> iteritems
- print -> print()
- running 2to3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright 2014, 2015 Canonical Ltd.  This software is licensed under the
2
2
# GNU General Public License version 3 (see the file LICENSE).
3
 
from __future__ import print_function
 
3
 
4
4
import argparse
5
5
import errno
6
6
import logging
256
256
 
257
257
 
258
258
def list_projects(args):
259
 
    map(print, mojo.project.Project.list(args.mojo_root, only_names=args.names))
 
259
    list(map(print, mojo.project.Project.list(args.mojo_root, only_names=args.names)))
260
260
 
261
261
 
262
262
@warn_if_root
312
312
 
313
313
def list_workspaces(args):
314
314
    project = mojo.project.Project(get_project_name(args), args.series, args.mojo_root)
315
 
    map(print, project.workspace_list())
 
315
    list(map(print, project.workspace_list()))
316
316
 
317
317
 
318
318
def new_spec(args):