Permalink
Browse files

Fix parallel print statement

  • Loading branch information...
1 parent 4a3b5d9 commit bfcfe5812f2ee7f8c7ff934b110421605c261c16 @tobami committed Jan 28, 2013
Showing with 7 additions and 8 deletions.
  1. +6 −5 littlechef/chef.py
  2. +1 −3 littlechef/runner.py
View
@@ -26,12 +26,9 @@
from fabric.utils import abort
from fabric.contrib.project import rsync_project
-from littlechef import cookbook_paths, whyrun
-from littlechef import lib
-from littlechef import solo
+from littlechef import cookbook_paths, whyrun, lib, solo
from littlechef import LOGFILE, enable_logs as ENABLE_LOGS
-
# Path to local patch
basedir = os.path.abspath(os.path.dirname(__file__).replace('\\', '/'))
@@ -337,7 +334,11 @@ def _add_search_patch():
def _configure_node():
"""Exectutes chef-solo to apply roles and recipes to a node"""
- print("\n[{0}]: Cooking...".format(env.host_string))
+ msg = "\n"
+ if env.parallel:
+ msg += "[{0}]: "
+ msg += "Cooking...".format(env.host_string)
+ print(msg)
# Backup last report
with settings(hide('stdout', 'warnings', 'running'), warn_only=True):
sudo("mv {0} {0}.1".format(LOGFILE))
View
@@ -24,9 +24,7 @@
from ssh.config import SSHConfig as _SSHConfig
import littlechef
-from littlechef import solo
-from littlechef import lib
-from littlechef import chef
+from littlechef import solo, lib, chef
# Fabric settings
import fabric

0 comments on commit bfcfe58

Please sign in to comment.