some debugging code

Changes to be committed:
	modified:   modules/maintenance.py
This commit is contained in:
Ronny Abraham 2017-06-12 20:47:35 +03:00
parent 5faa4fd99b
commit 4e561b8df3

View file

@ -76,24 +76,40 @@ def edit(remote_path):
# configuration = env.config
if sys.platform == "darwin":
editor = "mvim"
else:
editor = "vim"
# if env.key_filename:
# cmd_edit = "{editor} sftp://{user}@{host_string}/{remote_path}" \
# " -i {keyfile}".format(
# editor=editor,
# user=env.user,
# host_string=env.host_string,
# remote_path=remote_path,
# keyfile=env.key_filename,
# )
# else:
# cmd_edit = "{editor} sftp://{user}@{host_string}/{remote_path}".format(
# editor=editor,
# user=env.user,
# host_string=env.host_string,
# remote_path=remote_path)
cmd_edit = "{editor} sftp://{user}@{host_string}/{remote_path}".format(
editor=editor,
user=env.user,
host_string=env.host_string,
remote_path=remote_path)
if env.debug:
# logger.debug("remote_path : %s" % remote_path)
# logger.debug("env.host_string : %s" % env.host_string)
# logger.debug("sys.platform : %s" % sys.platform)
pass
print "maintenance.edit - cmd_edit: %s" % cmd_edit
print "env.key_filename: %s" % env.key_filename
else:
if sys.platform == "darwin":
editor = "mvim"
else:
editor = "vim"
cmd_edit = "{editor} sftp://{user}@{host_string}/{remote_path}".format(
editor=editor,
user=env.user,
host_string=env.host_string,
remote_path=remote_path)
local(cmd_edit)