# HG changeset patch # User ymh # Date 1354224867 -3600 # Node ID fc1eea0039d8ce95eacbaeddfbcffb828f05edc6 # Parent 740d11ae9e281606a2361c718b0e5955c7ac5051 small correction on fabric file diff -r 740d11ae9e28 -r fc1eea0039d8 sbin/sync/fabfile.py --- a/sbin/sync/fabfile.py Thu Nov 29 18:59:30 2012 +0100 +++ b/sbin/sync/fabfile.py Thu Nov 29 22:34:27 2012 +0100 @@ -126,7 +126,8 @@ with prefix("source %s" % activate_path): if module_to_uninstall: - run("pip uninstall %s" % module_to_uninstall) + with settings(warn_only=True): + run("pip uninstall -y %s" % module_to_uninstall) run("pip install \"%s\"" % remotepath) def collectstatic(remotepath, remotevirtualenvpath, platform_web_module): @@ -140,12 +141,16 @@ def create_config(export_path): print("Create config from %s" % (export_path,)) - remotepath = env.remote_path['web'] + remotepath = env.remote_path['src'] remote_config_path = os.path.join(remotepath, env.platform_web_module, "config.py") - template_path = os.path.join(export_path, "web", env.platform_web_module, "config.py.tmpl") + template_path = os.path.join(export_path, "src", env.platform_web_module, "config.py.tmpl") context = { - 'base_dir': os.path.join(remotepath, env.platform_web_module).rstrip("/")+"/", + 'base_dir': os.path.join(remotepath, env.platform_web_module).rstrip("/")+"/", + 'asctime': '%(asctime)s', + 'levelname': '%(levelname)s', + 'message': '%(message)s', + 'module': '%(module)s', } context.update(env.config['web']) @@ -226,7 +231,7 @@ print("Relaunch server") check_folder_access() if do_collectstatic: - collectstatic(env.remote_path['web'], env.remote_path['virtualenv'], env.platform_web_module) + collectstatic(env.remote_path['src'], env.remote_path['virtualenv'], env.platform_web_module) sudo(env.web_relaunch_cmd, shell=False) @task