From 0f4191f7a951d54c4a76b7030d61e9f4b697de56 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Thu, 31 Jul 2014 14:40:51 +0100 Subject: [PATCH] Only print the Success! message if the command actually succeeded :-P --- wagtail/bin/wagtail.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wagtail/bin/wagtail.py b/wagtail/bin/wagtail.py index 7afd503b8..458b0b399 100644 --- a/wagtail/bin/wagtail.py +++ b/wagtail/bin/wagtail.py @@ -44,14 +44,15 @@ def create_project(parser, options, args): template_path = os.path.join(wagtail_path, 'project_template') # Call django-admin startproject - subprocess.call([ + result = subprocess.call([ 'django-admin.py', 'startproject', '--template=' + template_path, '--name=Vagrantfile', '--ext=html,rst', project_name ]) - print("Success! %(project_name)s is created" % {'project_name': project_name}) + if result == 0: + print("Success! %(project_name)s is created" % {'project_name': project_name}) COMMANDS = {