modify logdir , asset beizhu

pull/2/head
ibuler 2014-10-31 00:07:33 +08:00
parent 596573293f
commit de2837229c
2 changed files with 5 additions and 4 deletions

View File

@ -105,9 +105,10 @@ def run_cmd(cmd):
def connect(host, port, user, password):
"""Use pexpect module to connect other server."""
if not os.path.isdir(log_dir):
os.mkdir(log_dir)
logfile = open("%s/%s_%s_%s" % (log_dir, host, time.strftime('%Y%m%d'), user), 'a')
log_date_dir = '%s/%s' % (log_dir, time.strftime('%Y%m%d'))
if not os.path.isdir(log_date_dir):
os.mkdir(log_date_dir)
logfile = open("%s/%s_%s" % (log_date_dir, host, user), 'a')
logfile.write('\n\n%s\n\n' % time.strftime('%Y%m%d_%H%M%S'))
cmd = 'ssh -q -p %s %s@%s' % (port, user, host)
global foo

View File

@ -34,7 +34,7 @@
<div class="form-group">
<label for="comment" class="col-sm-2 control-label">备注<span style="color: red"></span></label>
<div class="col-sm-4">
<input type="text" class="form-control" id="comment" name="comment" placeholder="备注">
<input type="text" class="form-control" id="comment" name="comment" placeholder="备注(最好是英文)">
</div>
</div>