From 4e561b8df34779151b0aa54581abfeca1504dfb2 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Mon, 12 Jun 2017 20:47:35 +0300 Subject: [PATCH] some debugging code Changes to be committed: modified: modules/maintenance.py --- modules/maintenance.py | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/modules/maintenance.py b/modules/maintenance.py index 2d1fc94..03b35cc 100644 --- a/modules/maintenance.py +++ b/modules/maintenance.py @@ -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)