python - Fabric show print after executing commands -


i have post-receive hook on git bare repo excute fabfile.py:

def deploy():     print(cyan('pulling changes local server'))      cd('/var/www')         local('git pull') 

it executes fine, shows output local command before print, this:

remote: /media/projetos/repositorios/test remote:    b057a4b..02d85b3  master     -> origin/master remote: updating b057a4b..02d85b3 remote: fast-forward remote:  .../test/template/catalog/product/list.phtml     | 98 +++++++++++----------- remote:  1 file changed, 47 insertions(+), 51 deletions(-) remote: pulling changes local server 

if ssh on server , run fab deploy works normal.

add sys.stdout.flush() call after printing, if output buffered (as on pipe, case when running under git hook), sent output stream @ point, before running command.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -