some debugging code
Changes to be committed: modified: modules/maintenance.py
This commit is contained in:
parent
5faa4fd99b
commit
4e561b8df3
1 changed files with 29 additions and 13 deletions
|
|
@ -76,24 +76,40 @@ def edit(remote_path):
|
||||||
|
|
||||||
# configuration = env.config
|
# 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:
|
if env.debug:
|
||||||
# logger.debug("remote_path : %s" % remote_path)
|
# logger.debug("remote_path : %s" % remote_path)
|
||||||
# logger.debug("env.host_string : %s" % env.host_string)
|
# logger.debug("env.host_string : %s" % env.host_string)
|
||||||
# logger.debug("sys.platform : %s" % sys.platform)
|
# 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:
|
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)
|
local(cmd_edit)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue