From 1ec76703227caf73b83020b0dde29dd1461033ce Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 31 Jul 2014 10:33:06 +0100 Subject: [PATCH] Python 3 support for wagtail command --- wagtail/bin/wagtail.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wagtail/bin/wagtail.py b/wagtail/bin/wagtail.py index 6d7e71c7c..d5026d167 100644 --- a/wagtail/bin/wagtail.py +++ b/wagtail/bin/wagtail.py @@ -1,4 +1,6 @@ #!/usr/bin/env python +from __future__ import print_function + import os import subprocess import errno @@ -28,11 +30,11 @@ def create_project(parser, options, args): # Make sure directory does not already exist if os.path.exists(project_name): - print 'A directory called %(project_name)s already exists. \ - Please choose another name for your wagtail project or remove the existing directory.' % {'project_name': project_name} + print('A directory called %(project_name)s already exists. \ + Please choose another name for your wagtail project or remove the existing directory.' % {'project_name': project_name}) sys.exit(errno.EEXIST) - print "Creating a wagtail project called %(project_name)s" % {'project_name': project_name} + print("Creating a wagtail project called %(project_name)s" % {'project_name': project_name}) # Create the project from the wagtail template using startapp @@ -49,7 +51,7 @@ def create_project(parser, options, args): project_name ]) - print "Success! %(project_name)s is created" % {'project_name': project_name} + print("Success! %(project_name)s is created" % {'project_name': project_name}) COMMANDS = {